Mailing List Archive


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

Re: [tlug] Re: /proc/uptime



Hi,

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".

>>         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:

[vuhung@example.com ~]$ cat /proc/uptime
574623.29 570215.85

That means, 99% of the time there is no "normal task" running!?

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


-- 
Best Regards,
Nguyen Hung Vu ( Nguyễn Vũ Hưng )
vuhung16plus{remove}@example.com , YIM: vuhung16 , Skype: vuhung16dg
A brief profile: http://www.hn.is.uec.ac.jp/~vuhung/Nguyen.Vu.Hung.html

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links