about definition of iowait
Hi,
I noticed some problems about iowait entry of /proc/stat: it seems not accurate, and sometimes will decrease in SMP.
For UP, we have a simple definition about iowait, which is:
The time that the processor is idle, during which there is a task waiting for I/O.
This definition seems don't fit well when step into SMP era, so I think maybe it can be extended like:
For a given CPU, the I/O wait time is the time during which that CPU was idle, and there is at least one outstanding disk I/O operation requested by a task scheduled on that CPU.
But tasks can migrate among cpus, so this definition maybe not accurate.
I also saw some suggestions that it should be a global value, not per cpu, but don`t see clear definition, so anyone have suggestions about it? (personally guessing, maybe: there is task waiting for outstanding I/O while all cpus are idle? But I don't think it is good...)
Signature · 3 lines
Yours Sincerely, Cao jin
Quoted 15 lines · Cao jin
Hi,
I noticed some problems about iowait entry of
/proc/stat: it seems not accurate, and sometimes will decrease in SMP.For UP, we have a simple definition about iowait, which is:
The time that the processor is idle, during which there is a task waiting for I/O.This definition seems don't fit well when step into SMP era, so I think maybe it can be extended like:
For a given CPU, the I/O wait time is the time during which that CPU was idle, and there is at least one outstanding disk I/O operation requested by a task scheduled on that CPU.
Quoted 6 lines
But tasks can migrate among cpus, so this definition maybe not accurate.
I also saw some suggestions that it should be a global value, not per cpu, but don`t see clear definition, so anyone have suggestions about it? (personally guessing, maybe: there is task waiting for outstanding I/O while all cpus are idle? But I don't think it is good...)
It is possible to come up with definition for a single global number; per-cpu iowait numbers are doomed.
But I don't see it matters one way or the other. Personally I would just make the kernel return 0 and be done with it.
Quoted 23 lines · Peter Zijlstra
Quoted 15 lines · Cao jin
Hi,
I noticed some problems about iowait entry of
/proc/stat: it seems not accurate, and sometimes will decrease in SMP.For UP, we have a simple definition about iowait, which is:
The time that the processor is idle, during which there is a task waiting for I/O.This definition seems don't fit well when step into SMP era, so I think maybe it can be extended like:
For a given CPU, the I/O wait time is the time during which that CPU was idle, and there is at least one outstanding disk I/O operation requested by a task scheduled on that CPU.Quoted 6 lines
But tasks can migrate among cpus, so this definition maybe not accurate.
I also saw some suggestions that it should be a global value, not per cpu, but don`t see clear definition, so anyone have suggestions about it? (personally guessing, maybe: there is task waiting for outstanding I/O while all cpus are idle? But I don't think it is good...)
Quoted 6 lines
It is possible to come up with definition for a single global number; per-cpu iowait numbers are doomed.
But I don't see it matters one way or the other. Personally I would just make the kernel return 0 and be done with it.
I see. Thanks peter
Signature · 3 lines
Yours Sincerely, Cao jin
Hi Peter
Sorry to bother you on this topic again.
Quoted 23 lines · Peter Zijlstra
Quoted 15 lines · Cao jin
Hi,
I noticed some problems about iowait entry of
/proc/stat: it seems not accurate, and sometimes will decrease in SMP.For UP, we have a simple definition about iowait, which is:
The time that the processor is idle, during which there is a task waiting for I/O.This definition seems don't fit well when step into SMP era, so I think maybe it can be extended like:
For a given CPU, the I/O wait time is the time during which that CPU was idle, and there is at least one outstanding disk I/O operation requested by a task scheduled on that CPU.Quoted 6 lines
But tasks can migrate among cpus, so this definition maybe not accurate.
I also saw some suggestions that it should be a global value, not per cpu, but don`t see clear definition, so anyone have suggestions about it? (personally guessing, maybe: there is task waiting for outstanding I/O while all cpus are idle? But I don't think it is good...)
Quoted 6 lines
It is possible to come up with definition for a single global number; per-cpu iowait numbers are doomed.
But I don't see it matters one way or the other. Personally I would just make the kernel return 0 and be done with it.
So I just want to make sure, is it acceptable if I send a patch make iowait a constant 0? Because make it zero seems we are abandoning it(0 doesn'`t have any meanings for it). While maybe some user space tools monitors this value.
Signature · 3 lines
Yours Sincerely, Cao jin