4

I'm using the Linux shell time and GNU time commands for some basic benchmarking.

But my system occasionally has varying load from other users.

Are the "user" and "sys" outputs affected by these other users?

I would think for a program with pure processing, that the results should be unaffected as the OS is (I would think) capable of tracking process time shares pretty exactly.

I'm less sure what the outputs would be for I/O heavy processes.

Can anyone explain these relations? Citations are always welcome.

4

1 回答 1

1

time 命令不报告上下文切换开销,因为它不是系统调用。因此,由于上下文切换,您不会看到系统时间输出有任何变化。如果由于其他用户的 IO/CPU 请求而导致资源争用,那么这将影响您的阻塞时间和完成时间,因此sys时间user可能会非常高。

于 2012-12-11T01:16:24.337 回答