1

In my application written in C++, I am getting below time information.

0.46u CPU user time
1.27s CPU kernel time
41.83s Real wall clock
4% CPU% usage.
0 Major page faults
207848 No. of file system outputs.
100269 minor page faults.
82: No. of times the process was context switched involuntarily.
1297 No. of times that the program was context-switched.

What can be reason for such high wall time, even though there was no major page fault?

Raptor
  • 53,206
  • 45
  • 230
  • 366
quartz
  • 747
  • 9
  • 26

1 Answers1

2

Because your code is spending a lot of time doing disk I/O and "waiting":

207848 No. of file system outputs.
100269 minor page faults.
82: No. of times the process was context switched involuntarily.
1297 No. of times that the program was context-switched.

All of these activities (except "no of times process was context switched involuntarily") are indications that your process is doing a lot of waiting around for the hard-disk to deliver something or take on something.

Also the fact that your code is spending more time in Kernel mode then in user mode, is another indication that your code is doing a lot of disk I/O (or other I/O).

Mats Petersson
  • 126,704
  • 14
  • 140
  • 227
  • Thanks Mats, but the major page fault is 0. That means process doesn't read/write anything to the disk. – quartz Aug 01 '13 at 10:29
  • True, but it still traps into the OS to service the page-fault - so it adds to the time the process spends in kernel mode. And the `No of file system outputs` are definitely not zero. So you must be writing to some file(-system device) somewhere. – Mats Petersson Aug 01 '13 at 10:40