cx_lowest and CPU usage
avg at icyb.net.ua
Thu Feb 14 13:31:20 PST 2008
on 14/02/2008 22:13 Andriy Gapon said the following:
> on 14/02/2008 19:14 Bengt Ahlgren said the following:
>> Andriy Gapon <avg at icyb.net.ua> writes:
>>> on 11/02/2008 23:41 Andriy Gapon said the following:
>>>> on 01/02/2008 17:37 Andriy Gapon said the following:
>>>>>> Andriy Gapon wrote:
>>>>>>> Report for 7.0-RC1 on quite old hardware: 440BX-based motherboard,
>>>>>>> 450Mhz Pentium III (Katmai).
>>>>>>> There is a weird thing: if I change cx_lowest to C2 when the machine is
>>>>>>> completely idle, top shows that CPU usage for interrupts immediately
>>>>>>> jumps to almost 20%. Change cx_lowest to C1, CPU usage drops back to
>>>>>>> almost 0%.
>>>>>>> Is this normal ?
>>> I mis-reported the issue. Actually the above behavior occurs if I
>>> throttle CPU 50% (via acpi throttling) and I am not concerned about this
>>> at all.
It seems that I was incorrect when I said that I was incorrect :-)
This is surprising to myself, I made a configuration change since the
first test. See below.
>>> C2 has even stranger effects.
>>> On almost idle system, with cx_lowest=C1, top reports about 0-2% user,
>>> 0% nice, 0-2% system, 1-2% interrupt, 94-98% idle.
>>> After changing cx_lowest to C2, I see the following: 0-2% user, 0% nice,
>>> 0-2% system, 94-98% interrupt, 1-2% idle.
>> With this slow CPU, a wakeup time of 90 from C2 could very well result
>> in this much interupt time. It just barely manages to wake up,
>> execute the clock interrupt and go to sleep again before the next
>> clock interrupt. What if you reduce HZ?
I ran a series of tests, repeating each twice to be sure that I didn't
make any mistake.
All tests were performed in single-user mode, so the system was as idle
as possible, top reported idle as 99.N% - 100%.
Then I set hw.acpi.cpu.cx_lowest=C2 and ran top again.
Here's the results:
GENERIC, SCHED_4BSD, default HZ=1000 ==> C2-interrupt 11-14% (!!)
GENERIC, SCHED_4BSD, kern.hz="100" ==> C2-interrupt 99-100%
customized kernel, SCHED_ULE, default HZ=1000 ==> C2-interrupt 99-100%
customized kernel, SCHED_ULE, kern.hz="100" ==> C2-interrupt 99-100%
The results are quite surprising to me and I don't have any idea how to
But they seem (at least to me) to support the guess that this is an
issue of scheduling and statistics gathering.
More information about the freebsd-acpi