<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>frequency &#8211; Luxing Huang</title>
	<atom:link href="https://luxing.im/tag/frequency/feed/" rel="self" type="application/rss+xml" />
	<link>https://luxing.im</link>
	<description>Thoughs and things</description>
	<lastBuildDate>Sun, 02 Feb 2020 07:13:46 +0000</lastBuildDate>
	<language>en-CA</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
<site xmlns="com-wordpress:feed-additions:1">58771605</site>	<item>
		<title>Put CPU under Performance mode in Linux</title>
		<link>https://luxing.im/put-cpu-under-performance-mode-in-linux/</link>
					<comments>https://luxing.im/put-cpu-under-performance-mode-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Sun, 02 Feb 2020 07:13:46 +0000</pubDate>
				<category><![CDATA[Learning Notes]]></category>
		<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[frequency]]></category>
		<category><![CDATA[tuning]]></category>
		<guid isPermaLink="false">https://luxing.im/?p=832</guid>

					<description><![CDATA[Linux kernel is able to control every tiny bit of the hardware it operates. This time I am going to max out my server&#8217;s CPU performance by tuning the CPU to the performance mode. I have been renting a dedicated server for a long time, on the server I have been hosting a few virtual &#8230; <p class="link-more"><a href="https://luxing.im/put-cpu-under-performance-mode-in-linux/" class="more-link">Continue reading<span class="screen-reader-text"> "Put CPU under Performance mode in Linux"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Linux kernel is able to control every tiny bit of the hardware it operates. This time I am going to max out my server&#8217;s CPU performance by tuning the CPU to the performance mode.</p>
<p><span id="more-832"></span></p>
<p>I have been renting a dedicated server for a long time, on the server I have been hosting a few virtual servers to serve my needs. In order to bring up the performance a little bit, I decide to bring the CPU frequency in high ranges at all times.</p>
<p>The raw way is to put <code>performance</code> (should be defined in <code>/sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors</code>) to <code>/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor</code></p>
<p>Now if my server has 1 or 2 cores, I may just change the cpu0 and cpu1 values directly, but what if I have 32 cores or even more? Human errors will occur while scripting. We have command line tools to help us changing the governor instead, it is called <code>cpupower</code>.</p>
<p>All commands are run under root.</p>
<h3>Install cpupower</h3>
<p>On CentOS, cpupower is brought by <code>kernel-tools</code> package.</p>
<pre>yum install kernel-tools -y</pre>
<h3>Turn on cpupower service</h3>
<pre>
systemctl daemon-reload
systemctl enable cpupower
systemctl start cpupower
</pre>
<p>Now by your definition of the cpupower service, you may have already turned on performance mode, please check any of the scaling_governor file.</p>
<h3>Make machine performant</h3>
<pre>
cpupower frequency-set -g performance</h3>
</pre>
<p>You should be set. Check your CPU cores by <code>watch -s 2 cat /proc/cpuinfo</code> (control+c terminates watch)<br />
Your CPU cores should be running at high frequency range at all times.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/put-cpu-under-performance-mode-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">832</post-id>	</item>
	</channel>
</rss>
