Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] Re: /proc/uptime



"Nguyen Vu Hung" <vuhung16plus@example.com> writes:
> On Wed, Nov 12, 2008 at 12:30 PM, John Fremlin <john@example.com> wrote:
>> "Nguyen Vu Hung" <vuhung16plus@example.com> writes:
>>
>>> What is the meaning of the second number( idle time) in the output of
>>> `cat /proc/uptime`?
>>> I really don't understand what is the "idle time" of the kernel.
>>
>> I'm not sure since it's a long time since I was doing kernel stuff, but
>> here's my recollection.
>>
>> When no normal task is scheduled the kernel runs the
>> init_task. This is a dummy task that is created before userspace is ever
>> entered. Nowadays, it does something like repeatedly call the ACPI
>> sleep hook.
> What do you mean by "normal task".

Sorry for not being more precise. I assume it is everything except
init_task, so that would include userspace tasks, kernel tasks like
kswapd and kcryptd and all the various classes of interrupt handling.

But I'm not sure.

>>>         cputime_t idletime = cputime_add(init_task.utime, init_task.stime);
>>
>> This just adds up how much time (user + system) has been spent in the
>> init_task, so how much time has been spent with no actual task running.
> On a heavy-load web server which server which serves dozens TB every months
> I see:

Why do you think that it is heavily loaded?

Maybe the CPU is idle all the time waiting for disk and network.

[...]

> What the CPU does in its "idle time"? I am sure httpd get requests
> every seconds.

Well that would be consistent with 99% idle.

[...]


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links