Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

linux time command resulting real is less than user

Tags:

linux

bash

time

When I test a perl script under linux and use time sh -c to measure the time spent, I got a weird result:

real    14m11.903s
user    34m39.319s
sys     16m54.074s

which means the real time spent is even less than user time. And visually counting the time by myself, the script didn't spent as much as 34 minutes, and real time is closer to what I see. Has anyone have any clue about this? Thanks.

like image 230
lolibility Avatar asked Oct 11 '12 14:10

lolibility


1 Answers

The script could have used more than 1 core.

like image 72
timos Avatar answered Nov 06 '22 04:11

timos