In my program , real time sometimes is as much as 3 times of cpu time. This is a single thread application that does a lot of memory allocation and NFS base read/write. So my doubt is that it is either mem-swap or NFS read-write that is slowing things down.
For example, the following is the output of
% /usr/bin/time a.out 2165.32user 64.93system 6036.33elapsed
Is there any profiling tool for real time ? I know and have used multiple tools for cpu time profiling, but am not sure if there is anything that can help and point out NFS/ mem-swap or any other wall clock slowdowns.
My program is written in C++
EDIT : /usr/bin/time gives me a summary at the end – I am not looking for that. I am looking for a way to correlate the real-time consumption during specific program blocks of my application. A profiler like collect/gprof that can tell me things like this
- that this area is where most context switches are happening due to waits
- specific functions where NFS access is happening.
Since my system is dedicated, I am not worried about other processes that might impact these profiles.