Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm running real-time application on the dedicated X3440 server and wondering why the application performance is worse than my former VPS box. Then I download http://i7z.googlecode.com/svn/trunk/i7z_64bit and execute it to see that under normal usage (in top around 10% cpu), all CPU core only stays around 900Mhz ~ 1200Mhz, and it fluctuates rapidly and inconsistent.
Then I try to set governor from ondemand to performance (echo performance > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor), and my application performs better because now all CPU core stays around 1700 ~ 1900Mhz (still fluctuating), but the application performance still doesn't meet my standard yet.
I have trying to disable any scaling completely by typing "service cpuspeed stop", and it's still showing the same result as performance governor.
Then I try to run 4 separate dummy nice low-priority tasks in each of the cores:
yum install gcc [enter]
nano dummy.c [enter]
This way, all 4 cores will stay at 2533mhz and never fluctuates anymore (regardless of the governor settings), and now my application performs very stellar and no complain whatsoever. But, I don't like the way these tasks waste resource, even though it's not disturbing the main application since it's on low priority.
My question:
In my home desktop windows computer, somehow my CPU speed is always going stable at max frequency. But why it doesn't happened on this CentOS 6 2.6.32 x86_64 dedicated server? Is there any way to set all cpu cores to max frequency without using any nice low-priority tasks?
But it doesn't work. Tried with cpuspeed started and stopped. It's like the cpufreq-set does nothing at all. Same also with performance governor (increase frequency a bit, but it won't stay at max frequencies).
killall -SIGUSR1 cpuspeed
cpuspeed: no process killed
I also tried to edit /etc/sysconfig/cpuspeed
MAX_SPEED=2528000
MIN_SPEED=2528000
cpu is still at 1.2 ~ 1.4ghz. Stopping cpuspeed gives same result. The only way to max the cpu is by using dummy application. I don't know why this happened.
Also tried this:
cpuspeed -m 2528000
Error: No speed steps could be determined!
killall -SIGUSR1 cpuspeed
cpuspeed: no process killed
Maybe it's using a slightly different name? Can you find a process that looks like it would be cpuspeed somewhere in the output of ps? Or maybe you forgot you had stopped cpuspeed first?
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 10.0 us.
hardware limits: 1.20 GHz - 2.53 GHz
available frequency steps: 2.53 GHz, 2.53 GHz, 2.39 GHz, 2.26 GHz, 2.13 GHz, 2.00 GHz, 1.86 GHz, 1.73 GHz, 1.60 GHz, 1.46 GHz, 1.33 GHz, 1.20 GHz
available cpufreq governors: ondemand, userspace, performance
current policy: frequency should be within 1.20 GHz and 2.53 GHz.
The governor "ondemand" may decide which speed to use
within this range.
Like that until no.7. Its on max speed now because of the dummy apps.
cpufreq-set -c 0 -r -g userspace
is not giving any output / response, but after executing this,
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor correctly will giving "userspace"
[root@server ~]# ps aux | grep cpu
root 3015 0.0 0.0 103244 832 pts/1 S+ 19:43 0:00 grep cpu
yes cpuspeed is started. The box doesn't have ipmi, so i can't access BIOS to see anything like speedstep to be disabled. Would be hard to asking remote hands, though.
cpufreq-set -c 0 -r -g userspace
is not giving any output / response, but after executing this,
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor correctly will giving "userspace"
cpufreq-set isn't expected to give any output, you need to run cpufreq-info to see the results (or read the /sys/...cpu/... files). So that looks like it worked, how about a followup cpufreq-set -c0 -r -f 2.53GHz? I noticed your cpufreq-info output in the previous post is missing the last 2 lines which say current frequency and frequency statistics.
Quote:
[root@server ~]# ps aux | grep cpu
root 3015 0.0 0.0 103244 832 pts/1 S+ 19:43 0:00 grep cpu
cpufreq-set -c0 -r -f 2.53GHz also output nothing. But when I open i7z, the cpu is still hovering around 1200 ~ 1500mhz. Sorry about cpuinfo, I apparently didn't block the whole text:
Quote:
[root@svr4 ~]# cpufreq-info
cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 10.0 us.
hardware limits: 1.20 GHz - 2.53 GHz
available frequency steps: 2.53 GHz, 2.53 GHz, 2.39 GHz, 2.26 GHz, 2.13 GHz, 2.00 GHz, 1.86 GHz, 1.73 GHz, 1.60 GHz, 1.46 GHz, 1.33 GHz, 1.20 GHz
available cpufreq governors: ondemand, userspace, performance
current policy: frequency should be within 1.20 GHz and 2.53 GHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 2.53 GHz (asserted by call to hardware).
Yes it says current CPU frequency is 2.53 GHz, cat /proc/cpuinfo also output that. But in reality, i7z reports is different (hovering around 1200 ~ 1500mhz). It will report 2533Mhz constant, only if I run cpu-hungry application.
cpuspeed isn't running? but if I type:
[root@server ~]# service cpuspeed start
Enabling ondemand cpu frequency scaling: [ OK ]
^ I type twice, and it will output nothing, which indicates it's running? I had to stop, then start it again to output that green [ OK ] message.
Yes it says current CPU frequency is 2.53 GHz, cat /proc/cpuinfo also output that. But in reality, i7z reports is different (hovering around 1200 ~ 1500mhz). It will report 2533Mhz constant, only if I run cpu-hungry application.
Apparently they aren't measuring the same thing. I see on the i7z site:
Quote:
Algorithm i use to calculate everything is as follows:
1. Show the user the freq. reported by /proc/cpuinfo and imply that it might be incorrect.
Probably cpufreq-info is the same as /proc/cpuinfo. I'm not really sure what to do at this point. Maybe try playing with the ruby script on the i7z site?
Quote:
Originally Posted by ThisOne
cpuspeed isn't running? but if I type:
[root@server ~]# service cpuspeed start
Enabling ondemand cpu frequency scaling: [ OK ]
^ I type twice, and it will output nothing, which indicates it's running? I had to stop, then start it again to output that green [ OK ] message.
This probably won't help solving your actual problem, but if you want, look at the /etc/init.d/cpuspeed script to see how it knows whether cpuspeed is running. You should be able to accomplish the same from the command line.
I think i7z gives more accurate results, because my main application performs better (there's a performance graph within that apps, indicating kernel latency) if the CPU stays stable at 2533mhz by using low-priority dummy task.
I will try to tinker with ruby script, and probably asking for remote hands to tinker a bios settings. Thanks for your helps.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.