Re: notebook cpu throttling

2007-05-22 Thread Ian Smith
On Tue, 22 May 2007 00:56:08 +0300 Ghirai [EMAIL PROTECTED] wrote:
  Hello Roland,
  
  Monday, May 21, 2007, 11:08:13 PM, you wrote:
  
   On Mon, May 21, 2007 at 09:52:22PM +0300, Ghirai wrote:
   Hello list,
   
   I'm running 6.2-RELEASE, SMP, on a
   Fujitsu-Siemens Amilo Pro v3205 (Core Duo).
   
   Everything works fine, except the cpu throttling,
   which makes the fan start quite often.
   
   Is there any way to fix this?
  
   You need to do three things (as root);
  
   1) Load the cpufreq module 'kldload cpufreq'.
   2) Put 'powerd_enable=YES' in your /etc/rc.conf
   2) Start powerd: '/etc/rc.d/powerd start'
  
   Roland
  
  Thanks for the hint.
  
  I did that, but now xorg constantly uses 20-30% CPU.
  
  CPUs were running cooler indeed, but everything ran jerky,
  because of the xorg cpu usage.
  
  Note that i haven't upgraded to 7.2 yet,
  but i don't think this is the problem.

This might not really indicate any problem.  Firstly, what are your
# sysctl dev.cpu.0.freq_levels

Try watching the current cpu speed (dev.cpu.0.freq) while running under
powerd.  You can watch it shift under various loads by running 'powerd
-v' in foreground, show it by running a script sleeping for eg a minute,
or use (say) gkrellm with gkfreq plugin to display cpu speed constantly.

Point being, if powerd has selected your lowest cpu frequency because
load is less than default (or as specified by -i and -r switches) and
this is (say) 1/4 of full speed, then something that normally showed 5%
cpu will now show as using 20% (of available cpu cycles at that speed) 

You can tune your powerd idle levels more towards performance, and/or
you can set a higher minimum cpu freq with sysctl debug.cpufreq.lowest
from among your available levels.

powerd's default shiftpoints work on my T23, but it's only a 2-speed :)

Cheers, Ian

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: notebook cpu throttling

2007-05-22 Thread Ian Smith
On Tue, 22 May 2007 19:35:10 +0300 Ghirai [EMAIL PROTECTED] wrote:
[..]
I did that, but now xorg constantly uses 20-30% CPU.

CPUs were running cooler indeed, but everything ran jerky,
because of the xorg cpu usage.
[..]
   Point being, if powerd has selected your lowest cpu frequency because
   load is less than default (or as specified by -i and -r switches) and
   this is (say) 1/4 of full speed, then something that normally showed 5%
   cpu will now show as using 20% (of available cpu cycles at that speed)
  
   You can tune your powerd idle levels more towards performance, and/or
   you can set a higher minimum cpu freq with sysctl debug.cpufreq.lowest
   from among your available levels.
[..]

  I suspected this; xorg just reporting to use 20-30% cpu doesn't bother
  my, what bothers me is the fact that mouse cursor and everything moves
  jerky.
  
  I'll try to raise the min. freq., maybe powerd lowers it too much..

Maybe.  In one recent example, a 1400MHz box (Thinkpad T42p) had freqs
all the way down to 75MHz while still running with 1mS slicing (1000HZ) 
apparently losing i8254 timer interrupts (when using APM, not with ACPI)

powerd(8) in adaptive mode with default settings will lower cpu freq one
level whenever the load idle is 90% or more, and raise freq (two levels) 
whenever idle gets less than 65%.  Looks like if you set that to say 75%
your xorg alone would kick it up.  Of course you must be careful not to
set the shiftpoints too close together, or you'll observe oscillation ..
again, running 'powerd -v' is useful while you're playing with tuning.

Re jerkiness, you might also benefit by decreasing the polling interval
(how often powerd checks load average) from 500mS to perhaps half that? 

I'm kinda interested in these fujitsu-siemens laptops myself, so I'm
still keen to see your 'sysctl dev.cpu.0.freq_levels' please? 

Cheers, Ian

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: notebook cpu throttling

2007-05-21 Thread Roland Smith
On Tue, May 22, 2007 at 12:56:08AM +0300, Ghirai wrote:
  Hello list,
  
  I'm running 6.2-RELEASE, SMP, on a
  Fujitsu-Siemens Amilo Pro v3205 (Core Duo).
  
  Everything works fine, except the cpu throttling,
  which makes the fan start quite often.
  
  Is there any way to fix this?
 
  You need to do three things (as root);
 
  1) Load the cpufreq module 'kldload cpufreq'.
  2) Put 'powerd_enable=YES' in your /etc/rc.conf
  2) Start powerd: '/etc/rc.d/powerd start'
 
  Roland
 
 Thanks for the hint.
 
 I did that, but now xorg constantly uses 20-30% CPU.

That's a lot. Are you doing anything to make it work hard? Such a
constantly high CPU usage is not normal, IMHO. Unless you're doing
something wacky like running xearth or xlock on your root window.

 CPUs were running cooler indeed, but everything ran jerky,
 because of the xorg cpu usage.

You can try to renice(8) the X server. That might make it less jerky.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpONdiBnVYzt.pgp
Description: PGP signature


Re: notebook cpu throttling

2007-05-21 Thread Roland Smith
On Tue, May 22, 2007 at 01:23:02AM +0300, Ghirai wrote:
  That's a lot. Are you doing anything to make it work hard? Such a
  constantly high CPU usage is not normal, IMHO. Unless you're doing
  something wacky like running xearth or xlock on your root window.
 
  You can try to renice(8) the X server. That might make it less jerky.

 No, i'm not doing anything at all.
 
 KDE loads up, and after about 10 seconds (of me doing
 nothing), xorg starts to use CPU, without any reason
 (and no HD activity).

Well, KDE isn't exactly a fetherweight. :/

 I tried it a couple of times, every time the same.
 
 I renice-ed it, no use.

It wouldn't help with CPU usage, but it might implrove the jerkiness.

 Are there any alternatives to powerd?

Not that I know of. 

I don't see an obvious connection between powerd and the X server. Maybe
you should ask on the freebsd-x11 list.

Or you can run powerd in the foreground, and test it with several
parameters, especially -i and -r.

Run iostat to see if the time is spent mainly in system or interrupt
mode. If so, use ktrace on the X server for a while, and then use kdump
on the trace file to see what it's been doing.

 Also checked logs, nothing at all.

Bummer.

 Oh, and thanks for your time :)

You're welcome!

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpb8C2WAMyme.pgp
Description: PGP signature