* taskstats and /proc/.../io asymmetry?
@ 2008-05-14 10:59 Mark Seger
2008-05-16 3:49 ` Balbir Singh
0 siblings, 1 reply; 2+ messages in thread
From: Mark Seger @ 2008-05-14 10:59 UTC (permalink / raw)
To: Shailabh Nagar, Balbir Singh, Jes Sorensen, Chris Sturtivant,
Tony Ernst, Guillaume Thouvenin, Jay Lan, linux-kernel
If you look at /proc/pid/stat, you can get the total CPU consumed by a
process. If you look at /proc/pid/task/tid/stat you can get the cpu
consumed by a thread and if the tid is that of the parent you only gets
its consumption as opposed to all its children.
I was surprised to see that the way process I/O is reported doesn't
follow this model. There are no /prod/pid/task/tid/io entries but
rather you need to look in /proc/tid/io. While I view this as a minor
inconvenience, I can certainly live with it. However, /proc/pid/io does
not show the aggregate I/O numbers for the whole process and that both
surprises and disappoints. This means if I have a process that starts a
bunch of worker threads that do the real work and I want to find the top
I/O consumers I can't simply walk the /proc/pid tree but rather have to
look at all the threads of each process and add them up.
Or am I missing something?
-mark
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: taskstats and /proc/.../io asymmetry?
2008-05-14 10:59 taskstats and /proc/.../io asymmetry? Mark Seger
@ 2008-05-16 3:49 ` Balbir Singh
0 siblings, 0 replies; 2+ messages in thread
From: Balbir Singh @ 2008-05-16 3:49 UTC (permalink / raw)
To: Mark Seger
Cc: Shailabh Nagar, Balbir Singh, Jes Sorensen, Chris Sturtivant,
Tony Ernst, Guillaume Thouvenin, Jay Lan, linux-kernel
Mark Seger wrote:
> If you look at /proc/pid/stat, you can get the total CPU consumed by a
> process. If you look at /proc/pid/task/tid/stat you can get the cpu
> consumed by a thread and if the tid is that of the parent you only gets
> its consumption as opposed to all its children.
>
> I was surprised to see that the way process I/O is reported doesn't
> follow this model. There are no /prod/pid/task/tid/io entries but
> rather you need to look in /proc/tid/io. While I view this as a minor
> inconvenience, I can certainly live with it. However, /proc/pid/io does
> not show the aggregate I/O numbers for the whole process and that both
> surprises and disappoints. This means if I have a process that starts a
> bunch of worker threads that do the real work and I want to find the top
> I/O consumers I can't simply walk the /proc/pid tree but rather have to
> look at all the threads of each process and add them up.
>
> Or am I missing something?
>
I looked through the code and your argument seems to be correct. The behaviour
is inconsistent w.r.t. other statistics like utime and stime. We currently
accumulate tgid information in signal_struct, we need to do something similar
for io as well. If nobody gets to it by the time I finish my backlog, I'll try
and get to it.
--
Warm Regards,
Balbir Singh
Linux Technology Center
IBM, ISTL
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-16 3:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-14 10:59 taskstats and /proc/.../io asymmetry? Mark Seger
2008-05-16 3:49 ` Balbir Singh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.