- Wall clock time
- User time
- CPU time
全部博文(21)
分类: LINUX
2010-04-26 21:00:49
One of these things is not like the other. Real refers to actual elapsed time; User and Sys refer to CPU time used only by the process.
Real is wall clock time - time from start to finish of the call. This is all elapsed time including time slices used by other processes and time the process spends blocked (for example if it is waiting for I/O to complete).
User is the amount of CPU time spent in user-mode code (outside the kernel) within the process. This is only actual CPU time used in executing the process. Other processes and time the process spends blocked do not count towards this figure.
Sys is the amount of CPU time spent in the kernel within the process. This means executing CPU time spent in system calls within the kernel, as opposed to library code, which is still running in user-space. Like 'user', this is only CPU time used by the process. See below for a brief description of kernel mode (also known as 'supervisor' mode) and the system call mechanism.
文章2:
We are running computing jobs with GridEngine. Every jobs returns 3 different times:
Answer:
What are the differences between these three? Which of these three is most suitable to compare the performance of two applications/scripts
Wall clock time is the actual amount of time taken to perform a job. This is equivalent to timing your job with a stopwatch and can be affected by anything else that the system happens to be doing at the time.
User time measures the amount of time the CPU spent running your code. This does not count anything else that might be running, and also does not count CPU time spent in the kernel (such as for file I/O).
CPU time measures the total amount of time the CPU spent running your code or anything requested by your code. This includes kernel time.
The "User time" measurement is probably the most appropriate for measuring the performance of different jobs, since it will be least affected by other things happening on the system.