idle process keeping cpu 150% busy in freebsd 9.1-amd64

Kostas Oikonomou k.oikonomou at att.net
Fri May 31 16:44:27 UTC 2013


John,

Thanks.  I am trying your suggestions on my Dell laptop (Intel Core i7, 
4 cores).

First off, my /etc/rc.conf already had

------------------------------------------------------------------------
# powerd: adaptive speed while on AC power, adaptive while on battery power
powerd_enable="YES"
powerd_flags="-a hiadaptive -b adaptive" # set CPU frequency
------------------------------------------------------------------------

and powerd was running.   With that, the output of sysctl was like what 
you sent (the default).

Now my /etc/rc.conf reads
------------------------------------------------------------------------
# powerd: adaptive speed while on AC power, adaptive while on battery power
powerd_enable="YES"
powerd_flags="-a hiadaptive -b adaptive" # set CPU frequency

# per John Baldwin email
performance_cx_lowest=LOW
------------------------------------------------------------------------

and I rebooted.  This is what sysctl shows now:


[ko at hui-neng ~]$ sysctl dev.cpu | grep cx_
dev.cpu.0.cx_supported: C1/3 C2/205 C3/245
dev.cpu.0.cx_lowest: C3
dev.cpu.0.cx_usage: 18.65% 3.89% 77.44% last 2564us
dev.cpu.1.cx_supported: C1/3 C2/205 C3/245
dev.cpu.1.cx_lowest: C3
dev.cpu.1.cx_usage: 18.05% 3.42% 78.52% last 2426us
dev.cpu.2.cx_supported: C1/3 C2/205 C3/245
dev.cpu.2.cx_lowest: C3
dev.cpu.2.cx_usage: 16.73% 3.63% 79.62% last 6272us
dev.cpu.3.cx_supported: C1/3 C2/205 C3/245
dev.cpu.3.cx_lowest: C3
dev.cpu.3.cx_usage: 15.78% 3.42% 80.78% last 2413us


But still one core is at 400%, and the fan started running:

[ko at hui-neng ~]$ ps -aux | head
USER        PID  %CPU %MEM    VSZ   RSS TT  STAT STARTED    TIME COMMAND
root         11 398.0  0.0      0    64 ??  RL   12:28PM 5:24.77 [idle]
root          0   0.0  0.1      0  2832 ??  DLs  12:28PM 0:00.54 [kernel]
root          1   0.0  0.0   6276   416 ??  SLs  12:28PM 0:00.05 
/sbin/init --
root          2   0.0  0.0      0    16 ??  DL   12:28PM 0:00.00 [crypto]
root          3   0.0  0.0      0    16 ??  DL   12:28PM 0:00.00 [crypto 
return
root          4   0.0  0.0      0    16 ??  DL   12:28PM 0:00.00 [ctl_thrd]
root          5   0.0  0.0      0    16 ??  DL   12:28PM 0:00.00 [cbb0 
event th
root          6   0.0  0.0      0    16 ??  IL   12:28PM 0:00.00 [fw0_probe]
root          7   0.0  0.0      0    96 ??  DL   12:28PM 0:00.02 [zfskern]
[ko at hui-neng ~]$

                                                         Kostas


On 05/31/2013 11:27, John Baldwin wrote:
> On Friday, May 31, 2013 10:47:34 am Kostas Oikonomou wrote:
>> Thanks very much for the reply.
>>
>> Being new to FreeBSD, this still seems weird to me.  (My
>> background is Solaris.)
>>
>> On both machines, the core that's running at 150% in the
>> case of the HP machine, and at 400% in the case
>> of the Dell laptop, is causing the fans to come on.  Would
>> you call that "idle"?  I'm worried that the cores will
>> eventually be damaged.
> Do you have deeper Cx states enabled?  By default FreeBSD will only enter C1.
> Try setting 'performance_cx_lowest=LOW' in /etc/rc.conf and either rebooting
> or running '/etc/rc.d/power_profile start' to see if that helps.  You can see
> which Cx states are being used by running 'sysctl dev.cpu | grep cx_'.  For
> example:
>
> dev.cpu.0.cx_supported: C1/3 C2/59 C3/93
> dev.cpu.0.cx_lowest: C1
> dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 324us
> dev.cpu.1.cx_supported: C1/3 C2/59 C3/93
> dev.cpu.1.cx_lowest: C1
> dev.cpu.1.cx_usage: 100.00% 0.00% 0.00% last 300us
> dev.cpu.2.cx_supported: C1/3 C2/59 C3/93
> dev.cpu.2.cx_lowest: C1
> dev.cpu.2.cx_usage: 100.00% 0.00% 0.00% last 192us
> dev.cpu.3.cx_supported: C1/3 C2/59 C3/93
> dev.cpu.3.cx_lowest: C1
> dev.cpu.3.cx_usage: 100.00% 0.00% 0.00% last 157us
>
> This is on a machine with the default setup.  After changing it to use the
> lowest setting:
>
> dev.cpu.0.cx_supported: C1/3 C2/59 C3/93
> dev.cpu.0.cx_lowest: C3
> dev.cpu.0.cx_usage: 5.84% 92.86% 1.28% last 145us
> dev.cpu.1.cx_supported: C1/3 C2/59 C3/93
> dev.cpu.1.cx_lowest: C3
> dev.cpu.1.cx_usage: 0.99% 94.92% 4.08% last 293us
> dev.cpu.2.cx_supported: C1/3 C2/59 C3/93
> dev.cpu.2.cx_lowest: C3
> dev.cpu.2.cx_usage: 0.45% 88.50% 11.04% last 174us
> dev.cpu.3.cx_supported: C1/3 C2/59 C3/93
> dev.cpu.3.cx_lowest: C3
> dev.cpu.3.cx_usage: 6.40% 86.89% 6.69% last 203us
>
> Another option is to run powerd which will throttle your CPUs down to lower
> clock speeds when they are idle.  You can enable this by setting
> powerd_enable="YES" in /etc/rc.conf and running '/etc/rc.d/powerd start'.
>



More information about the freebsd-amd64 mailing list