Closed macosforgebot closed 11 years ago
Axel.Rau@… originally submitted this as attachment:accesslog.diff:ticket:800
diff --git a/calendarserver/accesslog.py b/calendarserver/accesslog.py
@wsanchez originally submitted this as comment:1:ticket:800
Thanks for the patch.
Committed in r10944
@wsanchez originally submitted this as comment:2:ticket:800
Axel.Rau@… originally submitted this as ticket:800
While testing my new FreeBSD port on FreeBSD 8.2, I see the master process starting stealing cpu cycles after 1st client connect, so:
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 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.
Patch against git head attached.