Real time is the real time elapsed. System time is the time the kernel has been busy with your system calls. User time is the time spent in user space.
systime + usertime = realtime is true only if your process is the only process on the box, and if the kernel does all its fiddlings in no time. But you aren't interested in absolute times, but in relative - to identify bottlenecks.
To do so, time chunks of your application using Time::HiRes. Separate CPU intensive tasks from disk (also database) I/O and network I/O. You might want to run certain tasks in "dry run mode", eliminating I/O as much as possible. The sums of elapsed times will give you hints, but of course, those can be grossly distorted by other tasks running with higher priority than the ones you are observing.
|