1

I want to benchmark BLAST running time on my server so I started the time command. The server has 16 CPUs and I was running the BLAST 16 threaded. There may have been other applications running in parallel while my analysis was taking place.

The output is following:

184255.45user 458.23system 6:37:54elapsed 773%CPU (0avgtext+0avgdata 83504272maxresident)k
294680inputs+10029344outputs (1799major+149694417minor)pagefaults 0swaps

Interpreting user time as the amount of seconds CPU spent running my application I get more than the total time. I have seen people tell that I should divide the time with %CPU, but then I get just 3 minutes, and that is unrealistic for BLAST and input of the size I put into it.

The information I need is the user time, but I am not sure how to interpret it.

Any suggestions on the interpretation of the result?

Peter Cordes
  • 245,674
  • 35
  • 423
  • 606
  • Totally tangential (but possibly related) question: Is this a cluster? – L0j1k Feb 23 '13 at 10:32
  • 4
    You're doing the math wrong. 184255.45 ÷ 773% = 23800, or about 400 minutes. – Dietrich Epp Feb 23 '13 at 10:35
  • Just for the record (additionally to the comment by @DietrichEpp ): You have to divide percentages by `100`, otherwise you can't do calculations with them. `184,255.45s ÷ (773% ÷ 100) ≈ 23,836.41s` `23,836.41s ÷ 60 ≈ 400min` – RicoBrassers Sep 06 '16 at 10:46

1 Answers1

3

From the manpage (and taken from here):

The default format is:

    %Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
    %Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps

So, 184255 seconds spent in userspace, 458 seconds in kernelspace, 6 hours, 37 minutes and 54 seconds elapsed "real" time.

So as Dietrich Epp pointed out in his comment, and looking at the elapsed time, they match, 6:37:53 is 397.8833 minutes.

Here's a nice explanation of the difference between user/system/real(elapsed) time:

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.

Community
  • 1
  • 1
Matthias
  • 1,887
  • 1
  • 18
  • 35