[Bug 710319] Re: CPU usage is incorrect on server-status page
tinodj
710319 at bugs.launchpad.net
Thu Feb 3 22:01:19 UTC 2011
Hi Scott,
Thank you for your time. I did what you suggest, and I've noticed two
strange things.
1. Compiling showed me the following warnings:
gcc -o mytest mytest.c -lpthread
mytest.c: In function ‘child’:
mytest.c:83: warning: format ‘%3d’ expects type ‘int’, but argument 4 has type ‘ clock_t’
mytest.c:83: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘c lock_t’
mytest.c:83: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘c lock_t’
and so on ...
2. I was not able to test it with 500threads - it is production server, so ... I did it with 16.
Here is the result:
./mytest 16
### Prep:
loops_per_tick: 289017
threads : 16
### Test:
looptype : cont
samplesleep : no
## start ##
## done. ##
loop total:
user : 8800 ms
system : 80 ms
elapse : 4000 ms
error : 0
result: GOOD
Segmentation fault
^^^
Result is good - but there is a segmentation fault.
Furthermore, testing with apache, I found that the source of the problem
are the threads that are dying - because if I leave
MaxSpareServers=MaxClients and MaxRequestsPerChild=0 ( so no thread is
killed) then CPU usage seems normal.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to apache2 in ubuntu.
https://bugs.launchpad.net/bugs/710319
Title:
CPU usage is incorrect on server-status page
More information about the Ubuntu-server-bugs
mailing list