FreeBSD 5.x performance tips (ISC)
Julian Elischer
julian at elischer.org
Tue Jan 13 11:30:17 PST 2004
On Tue, 13 Jan 2004, Peter Losher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Thanks for the responses so far, many privately, I'd like to respond to them
> via one message, rather than a bunch of tiny ones.
>
Just an idea..
you say that several processes are in *Giant state.
it could be that one process is stuck in a piece of code that takes
too long..
if the CPU is at a high % then you can try "monte-carlo" debugging..
have a kernel that has teh DDB enabled..
when it gets sluggish,
enter the debugger <CTL><ALT><ESC> many times
(and come out again each time using "c" (Continue)
at each entry into the debugger, do a 'tr'
to get a stack trace, and possibly a 'PS' to look at the
state of the other proceses..
it should also be possible tosee who owns *Giant too..
maybe "show locks" might do it.. not sure..
JHB?
in any case look an see of there is any pattern as to where the CPU was
when you hit the <CTL><ALT><ESC> .
statistically that is a real slow way to "profile" teh kernel..
Of course you could also compile a profiles kernel and actually use
kgmon and/or kernbb to find out exactly where the cpu is spending its
time..
Julian
p.s. we recently found a bug in 4.8 using this method.(since fixed)
More information about the freebsd-current
mailing list