CPUSPEED Slowing you down?

I often come across systems where the cpu clock speed has been lowered due to cpuspeed. Here is how to up the clock speed on all the cpus with one command.

The box I was working on was a dual core 2 cpu box. Here is what the clock speed of the cpus was running at:


[jason@testdb ~]$ cat /proc/cpuinfo 
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 33
model name	: AMD Opteron(tm) Processor 280
stepping	: 2
cpu MHz		: 1804.132
cache size	: 1024 KB
.
.
.

We can see the clockspeed is 1804MHz. But I know these boxes can go faster:

[jason@testdb ~]$ sudo /usr/sbin/dmidecode |grep "Current Speed"

		Current Speed: 2400 MHz
		Current Speed: 2400 MHz

This is telling me that the cpu can go to 2.4GHz, and cpuspeed is currently underclocking it. We can see that cpuspeed is running, and in fact there is one for each cpu core.


[jason@testdb ~]$ ps -ef|grep cpu
root      3851     1  0  2010 ?        00:00:51 cpuspeed -d -n
root      3852  3851  0  2010 ?        00:00:37 cpuspeed -d -n
root      3853  3851  0  2010 ?        00:00:24 cpuspeed -d -n
root      3854  3851  0  2010 ?        00:00:24 cpuspeed -d -n

To ensure the cpu runs at full tilt you can send a signal to the parent cpuspeed pid:

[jason@testdb ~]$ sudo kill -SIGUSR1 3851

This has the impact of setting all cores to the maximum setting:

[jason@testdb ~]$ cat /proc/cpuinfo
.
.
.
processor	: 3
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 33
model name	: AMD Opteron(tm) Processor 280
stepping	: 2
cpu MHz		: 2405.510
cache size	: 1024 KB
.
.
.

You can ensure cpuspeed does not restart upon a reboot of your machine by doing the following:

sudo /sbin/chkconfig cpuspeed off
Advertisements

5 thoughts on “CPUSPEED Slowing you down?

  1. Surely if cpuspeed is clocking the cpu down it means the system is not busy, and when it does become busy cpuspeed should clock it back up. If this is not happenning then doesn’t that indicate a bug in cpuspeed that should be reported and addressed/fixed.

  2. Hello Jason,

    please take first my apologies for contacting you as owner of the Jarneil blog. As Oracle database professional you will be familiar with the advantages/disadvantages of Oracle tracefile analysis. So there is no need to waste your time with long explanations.

    The company I work for is developing a tool named QueryAdvisor specialized on Oracle tracefile analysis. QueryAdvisor provides more information and allows easier access to tracefile data then TKPROF (alone or in combination with TRCSESS) or even TRCANLZR does.

    We are now looking for DBAs and developers assisting as betatesters. We have chosen this approach to be sure that we will cover a huge amount of different Oracle database configurations (different hardware / releases / patch levels).

    You will receive a free Administrator License without restrictions or further obligations for your participation in our betatest and/or writing an article. To avoid any misunderstanding – this is not a new approach to sell you something. We are talking about a free license in exchange of some of your time and experience – nothing more nothing less. We hope that this is a win win situation for both of us.

    You will find additional information and the possibility to register as betatester at:
    http://goo.gl/akWSL

    More information how to obtain a free license for writing an article and/or review is available at: http://goo.gl/W2LpF

    If you like to do us a special favor – talk to your colleagues about our betatest and share the link.

    We will take care that you will not be contacted a second time. Sorry for any inconvenience caused and thanks for your time.

    Kind regards
    Frank

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s