While testing my new FreeBSD port on FreeBSD 8.2, I see the master process starting stealing cpu cycles after 1st client connect, so: PID JID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 39240 11 root 3 76 0 126M 49784K uwait 6 1:38 17.77% python2.7 This continues after the last client has disconnected until shutdown of the server. I truss trace available on request. I see lots of these cycles: --- 39240: 569.691188580 gettimeofday({1363347523.922570 },0x0) = 0 (0x0) 39240: 569.691278526 gettimeofday({1363347523.922653 },0x0) = 0 (0x0) 39240: 569.691396825 gettimeofday({1363347523.922779 },0x0) = 0 (0x0) 39240: 570.519904713 kevent(3,{},0,{},25,{0.827203989 }) = 0 (0x0) 39240: 570.520012258 gettimeofday({1363347524.751392 },0x0) = 0 (0x0) 39240: 570.520110025 __sysctl(0x7fffffffbc40,0x2,0x7fffffffbbd0,0x7fffffffbc38,0x8064ba765,0xc) = 0 (0x0) 39240: 570.520148644 __sysctl(0x7fffffffbbd0,0x2,0x7fffffffbc90,0x7fffffffbcb8,0x0,0x0) = 0 (0x0) --- Axel --- PGP-Key:29E99DD6 ☀ +49 151 2300 9283 ☀ computing @ chaos claudius
Am 15.03.2013 um 13:04 schrieb Axel Rau:
While testing my new FreeBSD port on FreeBSD 8.2, I see the master process starting stealing cpu cycles after 1st client connect, so: PID JID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 39240 11 root 3 76 0 126M 49784K uwait 6 1:38 17.77% python2.7
This continues after the last client has disconnected until shutdown of the server.
Profiling with Run Snake Run (thanks to Andre for the excellent how to) shows: The master process spent 98% in _psutil_bsd.get_virtual_mem(). Seems to be an expensive function in FreeBSD. Turning off the call in accesslog resolves the problem. Axel --- PGP-Key:29E99DD6 ☀ +49 151 2300 9283 ☀ computing @ chaos claudius
On Mar 17, 2013, at 11:44 AM, Axel Rau <Axel.Rau@Chaos1.DE> wrote:
Am 15.03.2013 um 13:04 schrieb Axel Rau:
While testing my new FreeBSD port on FreeBSD 8.2, I see the master process starting stealing cpu cycles after 1st client connect, so: PID JID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND 39240 11 root 3 76 0 126M 49784K uwait 6 1:38 17.77% python2.7
This continues after the last client has disconnected until shutdown of the server.
Profiling with Run Snake Run (thanks to Andre for the excellent how to) shows: The master process spent 98% in _psutil_bsd.get_virtual_mem(). Seems to be an expensive function in FreeBSD. Turning off the call in accesslog resolves the problem.
Thanks very much for tracking this down. Would you consider submitting a patch to our Trac instance? Thanks, -glyph
participants (3)
-
Axel Rau
-
Axel Rau
-
Glyph