Chinaunix首页 | 论坛 | 博客
  • 博客访问: 130736
  • 博文数量: 21
  • 博客积分: 850
  • 博客等级: 准尉
  • 技术积分: 146
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-26 20:50
文章分类
文章存档

2011年(4)

2010年(17)

我的朋友

分类: LINUX

2010-04-26 21:00:49

Real, User and Sys process time statistics

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:

  • Wall clock time
  • User time
  • CPU time

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.

阅读(1527) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:C/C++中static作用

给主人留下些什么吧!~~