Using large amounts of system time

Simon Marlow
Wed, 12 Feb 2003 11:19:00 -0000

> I appear to be using huge amounts of CPU time, and I am trying to work
> out why. The commands I ran and their output are in systime_log at
>, and all the source and other
> output is there too. Essentially the program uses more system=20
> time than
> user time according to time (bash built-in, Linux x86), and=20
> I'd like to
> know why (or more precisely I'd like to reduce it, but=20
> knowing why seems
> like a good first move  :-)  ).
> I'm somewhat confused as to why the numbers given by time and=20
> strace -c
> don't match, but nevertheless it looks to me like the time must be due
> to one or more of:
> rt_sigprocmask(SIG_SETMASK, [], NULL, 8) =3D 0
> rt_sigprocmask(SIG_BLOCK, [], [], 8)    =3D 0
> --- SIGVTALRM (Virtual timer expired) ---
> sigreturn()                             =3D ? (mask now [])
> I'm not sure where to go from here. Any suggestions?

>From the strace -c  ouput, I'd say the system time isn't being eaten up
by system calls and signals.  The only other system time sink is page
faults and swapping activity (I believe), but from the look of it your
program is only using a few MB.  What does the output from +RTS -Sstderr
look like?

I'm stumped too, but I'm intrigued to know what's going on.