~$ more /proc/cpuinfo | grep MHz
cpu MHz : 3200.301
cpu MHz : 3200.301
~$ cpufreq-info
cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 0.00 ms.
analyzing CPU 1:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 0.00 ms.
cpu frequency scaling
Moderators: MattKingUSA, khz
Re: cpu frequency scaling
I suspect that my mobo/CPU does not support governing/scaling. Can someone please confirm?
- angelsguitar
- Established Member
- Posts: 145
- Joined: Sat May 31, 2008 10:30 am
- Location: Florida
- Contact:
Re: cpu frequency scaling
I'm not sure if this would be the correct way to check for scaling compatibility, but maybe you could check for available scaling frequencies running this:halfsoul wrote:I suspect that my mobo/CPU does not support governing/scaling. Can someone please confirm?~$ more /proc/cpuinfo | grep MHz
cpu MHz : 3200.301
cpu MHz : 3200.301
~$ cpufreq-info
cpufrequtils 007: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 0.00 ms.
analyzing CPU 1:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 0.00 ms.
Code: Select all
more /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
Code: Select all
more /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
-
- Established Member
- Posts: 753
- Joined: Sat Nov 01, 2008 1:12 pm
Re: cpu frequency scaling
Thanks to the OP for starting this thread. I discovered that my recent installation of Ubuntu 10.04 had scaled my CPU back to 1 GHz. Ouch. For the record, I edited both /etc/init.d/cpufrequtils and /etc/init.d/ondemand to ensure full performance from my CPU, which is now running at its rated top speed of 2.4 GHz.
Ahh, that's better.
Best,
dp
Ahh, that's better.
Best,
dp
Re: cpu frequency scaling
Hi dp,StudioDave wrote:Thanks to the OP for starting this thread. I discovered that my recent installation of Ubuntu 10.04 had scaled my CPU back to 1 GHz. Ouch. For the record, I edited both /etc/init.d/cpufrequtils and /etc/init.d/ondemand to ensure full performance from my CPU, which is now running at its rated top speed of 2.4 GHz.
Ahh, that's better.
Best,
dp
Could you be a bit more specific? What did you change in the files, how do they look now?
thanks
Re: cpu frequency scaling
Thanks to you all, this thread was helpful for setting up my Ubuntu 12.04 system for audio work (particularly the 2nd post by philip888 on the 1st page). Much less xruns now with qtractor.
- angelsguitar
- Established Member
- Posts: 145
- Joined: Sat May 31, 2008 10:30 am
- Location: Florida
- Contact:
Re: cpu frequency scaling
Studio32, maybe StudioDave is referring to this little "hack" I explained before:
Since the "ondemand" script is really setting the cpu on performance mode, maybe it should be renamed "performance" or something like that. Or better yet, deactivate the ondemand script, make a copy under another name (maybe name it "performance"), change it as described above, and activate it again.angelsguitar wrote:Well, after a little tweaking and experimentation, I found that by editing /etc/init.d/ondemand I can make the governor change permanent. I just opened the file and on this section
I changed the part that says "ondemand" for "performance", so it now reads like this:Code: Select all
for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor do [ -f $CPUFREQ ] || continue echo -n ondemand > $CPUFREQ done
I don't know if this is the best way to do it, but it works for me - now the system boots in performance mode everytime, and both the realtime configuration script and cpufreq-info report the system as running in performance mode. Seems that, using this method, neither cpufreqd nor cpufrequtils is needed to make the change permanent.Code: Select all
for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor do [ -f $CPUFREQ ] || continue echo -n performance > $CPUFREQ done
- bluebell
- Established Member
- Posts: 1927
- Joined: Sat Sep 15, 2012 11:44 am
- Location: Saarland, Germany
- Has thanked: 113 times
- Been thanked: 122 times
Re: cpu frequency scaling
Hi all,
two important things:
- Switch off Turbo Boost. The Linux timer can't handle this. I experienced faster tempo in Rosegarden for a few seconds and then Audiotracks were totally out of sync. AFAIK Turbo Boost can only switched off in the BIOS.
- I use cpufreqd and have a rule to use the highest CPU freq when I start my audioprocessing. /etc/cpufreqd.conf:
#-- Profiles ---------------------------------------
[Profile]
name=On_Demand_High
minfreq=100%
maxfreq=100%
policy=ondemand
[/Profile]
[Profile]
name=On_Demand_Standard
minfreq=0%
maxfreq=100%
policy=ondemand
[/Profile]
#-- Rules ------------------------------------------
[Rule]
name=Standard_Rule
cpu_interval=0-100
profile=On_Demand_Standard
[/Rule]
[Rule]
name=CPU_Too_Hot
acpi_temperature=60-100
cpu_interval=50-100
profile=On_Demand_Standard
[/Rule]
[Rule]
name=Music_Production
programs=rosegarden,jamin
cpu_interval=0-100
profile=On_Demand_High
[/Rule]
two important things:
- Switch off Turbo Boost. The Linux timer can't handle this. I experienced faster tempo in Rosegarden for a few seconds and then Audiotracks were totally out of sync. AFAIK Turbo Boost can only switched off in the BIOS.
- I use cpufreqd and have a rule to use the highest CPU freq when I start my audioprocessing. /etc/cpufreqd.conf:
#-- Profiles ---------------------------------------
[Profile]
name=On_Demand_High
minfreq=100%
maxfreq=100%
policy=ondemand
[/Profile]
[Profile]
name=On_Demand_Standard
minfreq=0%
maxfreq=100%
policy=ondemand
[/Profile]
#-- Rules ------------------------------------------
[Rule]
name=Standard_Rule
cpu_interval=0-100
profile=On_Demand_Standard
[/Rule]
[Rule]
name=CPU_Too_Hot
acpi_temperature=60-100
cpu_interval=50-100
profile=On_Demand_Standard
[/Rule]
[Rule]
name=Music_Production
programs=rosegarden,jamin
cpu_interval=0-100
profile=On_Demand_High
[/Rule]
Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/
- raboof
- Established Member
- Posts: 1855
- Joined: Tue Apr 08, 2008 11:58 am
- Location: Deventer, NL
- Has thanked: 50 times
- Been thanked: 74 times
- Contact:
Re: cpu frequency scaling
Odd, never heard of that.bluebell wrote:Switch off Turbo Boost. The Linux timer can't handle this. I experienced faster tempo in Rosegarden for a few seconds and then Audiotracks were totally out of sync. AFAIK Turbo Boost can only switched off in the BIOS.
Wouldn't the 'performance' policy be more suitable here?bluebell wrote:[Profile]
name=On_Demand_High
minfreq=100%
maxfreq=100%
policy=ondemand
[/Profile]
- bluebell
- Established Member
- Posts: 1927
- Joined: Sat Sep 15, 2012 11:44 am
- Location: Saarland, Germany
- Has thanked: 113 times
- Been thanked: 122 times
Re: cpu frequency scaling
It drove me crazy until I found out by thinking ... hmmm ... it sounds about 20% faster ... 20% is about the turbo boost that can happen when only one core is busy.raboof wrote:Odd, never heard of that.bluebell wrote:Switch off Turbo Boost. The Linux timer can't handle this. I experienced faster tempo in Rosegarden for a few seconds and then Audiotracks were totally out of sync. AFAIK Turbo Boost can only switched off in the BIOS.
Should work as well. But this setup works for me.raboof wrote:Wouldn't the 'performance' policy be more suitable here?bluebell wrote:[Profile]
name=On_Demand_High
minfreq=100%
maxfreq=100%
policy=ondemand
[/Profile]
Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/
- angelsguitar
- Established Member
- Posts: 145
- Joined: Sat May 31, 2008 10:30 am
- Location: Florida
- Contact:
Re: cpu frequency scaling
I too have experienced some tempo variations for a few seconds too, on rare ocassions. I'll check this out if it happens again, thanks.bluebell wrote:Switch off Turbo Boost. The Linux timer can't handle this. I experienced faster tempo in Rosegarden for a few seconds and then Audiotracks were totally out of sync. AFAIK Turbo Boost can only switched off in the BIOS.
I agree with raboof on this; 'performance' might be a better option (unless you have problems with the CPU temperature, of course). Although, what I see here is that the profile is named "On_Demand_High" but the cpu min and max freq's are set too 100% - which really is a 'performance' setting.raboof wrote:Wouldn't the 'performance' policy be more suitable here?bluebell wrote:[Profile]
name=On_Demand_High
minfreq=100%
maxfreq=100%
policy=ondemand
[/Profile]
- raboof
- Established Member
- Posts: 1855
- Joined: Tue Apr 08, 2008 11:58 am
- Location: Deventer, NL
- Has thanked: 50 times
- Been thanked: 74 times
- Contact:
Re: cpu frequency scaling
Still quite peculiar: I can't see any direct relation between CPU speed and audio speed. After all, the audio speed is determined by the sample rate, and it's the soundcards' clock that takes care of moving bytes from the buffer to the speaker at that rate... shouldn't really be influenced by CPU speed...bluebell wrote:It drove me crazy until I found out by thinking ... hmmm ... it sounds about 20% faster ... 20% is about the turbo boost that can happen when only one core is busy.raboof wrote:Odd, never heard of that.bluebell wrote:Switch off Turbo Boost. The Linux timer can't handle this. I experienced faster tempo in Rosegarden for a few seconds and then Audiotracks were totally out of sync. AFAIK Turbo Boost can only switched off in the BIOS.
- bluebell
- Established Member
- Posts: 1927
- Joined: Sat Sep 15, 2012 11:44 am
- Location: Saarland, Germany
- Has thanked: 113 times
- Been thanked: 122 times
Re: cpu frequency scaling
Indeed. Rosegarden ran faster for a few seconds but audio didn't, so the synth-tracks and the vocals were out of sync.raboof wrote:Still quite peculiar: I can't see any direct relation between CPU speed and audio speed. After all, the audio speed is determined by the sample rate, and it's the soundcards' clock that takes care of moving bytes from the buffer to the speaker at that rate... shouldn't really be influenced by CPU speed...bluebell wrote: It drove me crazy until I found out by thinking ... hmmm ... it sounds about 20% faster ... 20% is about the turbo boost that can happen when only one core is busy.
Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/
Re: cpu frequency scaling
How exactly would I go about installing a governor? Cpufreq reports:
...
* Loading cpufreq kernel modules... [fail]
* CPUFreq Utilities: Setting ondemand CPUFreq governor... * disabled, governor not available... [ OK ]
...
analyzing CPU 0:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 1:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 2:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 3:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
EDIT: Oh, I see... It was a BIOS setting. Speedstep needed to be ON.
...
* Loading cpufreq kernel modules... [fail]
* CPUFreq Utilities: Setting ondemand CPUFreq governor... * disabled, governor not available... [ OK ]
...
analyzing CPU 0:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 1:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 2:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 3:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
EDIT: Oh, I see... It was a BIOS setting. Speedstep needed to be ON.
- Capoeira
- Established Member
- Posts: 1321
- Joined: Tue May 12, 2009 1:01 pm
- Location: Brazil
- Has thanked: 3 times
- Been thanked: 2 times
Re: cpu frequency scaling
I would like qjackctl to run
on start up...and
on stopping.
onfortuantly those need to be executed by root or sudo.
Anbody knows how I could achieve this
BTW: I tested the goveners and it made a huge difference here on my core-i3
Code: Select all
cpupower frequency-set -g performance
Code: Select all
cpupower frequency-set -g ondemand
onfortuantly those need to be executed by root or sudo.
Anbody knows how I could achieve this
BTW: I tested the goveners and it made a huge difference here on my core-i3
- autostatic
- Established Member
- Posts: 1994
- Joined: Wed Dec 09, 2009 5:26 pm
- Location: Beverwijk, The Netherlands
- Has thanked: 32 times
- Been thanked: 104 times
- Contact:
Re: cpu frequency scaling
There are different ways to do this. The easiest I guess would be to add the cpupower to your sudoers file (if your system has one) and allow a user to run it without having to issue a password:
Editing the sudoers file is done with the visudo command. Not sure if the sudoers syntax is correct though. There are other ways like using PolicyKit or changing the permissions on cpupower itself (which I wouldn't recommend).
Code: Select all
yourusername ALL=(ALL) NOPASSWD: /path/to/cpupower