Re: lightly loaded php+mysql - high syscall/csw rates
On Thu, Nov 22, 2007 at 12:43:25PM +0300, Andrew Pantyukhin wrote: > > We have a php+mysql web server. It serves 15-20 http requests per > second, resulting in 100-200 sql qps. But according to vmstat(1), > it all peaks at over 500k syscall/s and 100k cswitch/s. The peaks > are quite frequent, even at this load. During the peaks top(1) > shows 30-40k VCSW for mysql and around 1k vcsw for two php-cgi > worker processes. IVCSW is relatively very low for all processes. > > This is a 4-core Opteron HP DL145 G2 server running 6.2/amd64 > generic+quota. I'm considering a switch to 7.0. > > During peaks user/system/idle in top(1) is 20/30/50. > > The question is - is the syscall and csw rates normal or should I > be trying to tune mysql and php more agressively? I'm not hungry > for performance (haven't hit the limit yet), but a couple of days > ago the server stopped responding until a cold reboot (which is > another story) - and now I'm paying closer attention to its > vitals. Andrew, I don't know if you've been following stable@ but there is a long thread there about php performance (amongst other things). http://lists.freebsd.org/pipermail/freebsd-stable/2007-November/038371.html Titled: "2 x quad-core system is slower that 2 x dual core on FreeBSD"[sic] Apologies, if it's not related to the problem you're seeing. (It's over my head). -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: lightly loaded php+mysql - high syscall/csw rates
On Thu, Nov 22, 2007 at 02:52:06PM +, Vince wrote: > Andrew Pantyukhin wrote: > > We have a php+mysql web server. It serves 15-20 http requests per > > second, resulting in 100-200 sql qps. But according to vmstat(1), > > it all peaks at over 500k syscall/s and 100k cswitch/s. The peaks > > are quite frequent, even at this load. During the peaks top(1) > > shows 30-40k VCSW for mysql and around 1k vcsw for two php-cgi > > worker processes. IVCSW is relatively very low for all processes. > > > > This is a 4-core Opteron HP DL145 G2 server running 6.2/amd64 > > generic+quota. I'm considering a switch to 7.0. > > > > During peaks user/system/idle in top(1) is 20/30/50. > > > > The question is - is the syscall and csw rates normal or should I > > be trying to tune mysql and php more agressively? I'm not hungry > > for performance (haven't hit the limit yet), but a couple of days > > ago the server stopped responding until a cold reboot (which is > > another story) - and now I'm paying closer attention to its > > vitals. > This sounds like it could be related to the issues being discussed on a > thread on freebsd-stable titled "2 x quad-core system is slower that 2 x > dual core on FreeBSD" > [http://docs.freebsd.org/cgi/mailindex.cgi?sort=subject&file=current/freebsd-stable] Yeah, I'm following that thread, I just wanted to know if anyone else gets 500k+ syscalls per second on an php+mysql web server at 20 pages per second. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: lightly loaded php+mysql - high syscall/csw rates
Andrew Pantyukhin wrote: > We have a php+mysql web server. It serves 15-20 http requests per > second, resulting in 100-200 sql qps. But according to vmstat(1), > it all peaks at over 500k syscall/s and 100k cswitch/s. The peaks > are quite frequent, even at this load. During the peaks top(1) > shows 30-40k VCSW for mysql and around 1k vcsw for two php-cgi > worker processes. IVCSW is relatively very low for all processes. > > This is a 4-core Opteron HP DL145 G2 server running 6.2/amd64 > generic+quota. I'm considering a switch to 7.0. > > During peaks user/system/idle in top(1) is 20/30/50. > > The question is - is the syscall and csw rates normal or should I > be trying to tune mysql and php more agressively? I'm not hungry > for performance (haven't hit the limit yet), but a couple of days > ago the server stopped responding until a cold reboot (which is > another story) - and now I'm paying closer attention to its > vitals. This sounds like it could be related to the issues being discussed on a thread on freebsd-stable titled "2 x quad-core system is slower that 2 x dual core on FreeBSD" [http://docs.freebsd.org/cgi/mailindex.cgi?sort=subject&file=current/freebsd-stable] Switching to 7 and SCHED_ULE may gain you perfromance for this kind of workload over 4 cores going by the benchmarks provided by Kris Kennaway, although they mainly deal with 8 core systems. Forcing MySQL to use libthr instead of libpthread in libmap.conf may also help also and going solely by one post in the thread mentioned above you could try reducing kern.hz in loader.conf to something like 100 as this could help reduce the context switches. Vince > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
lightly loaded php+mysql - high syscall/csw rates
We have a php+mysql web server. It serves 15-20 http requests per second, resulting in 100-200 sql qps. But according to vmstat(1), it all peaks at over 500k syscall/s and 100k cswitch/s. The peaks are quite frequent, even at this load. During the peaks top(1) shows 30-40k VCSW for mysql and around 1k vcsw for two php-cgi worker processes. IVCSW is relatively very low for all processes. This is a 4-core Opteron HP DL145 G2 server running 6.2/amd64 generic+quota. I'm considering a switch to 7.0. During peaks user/system/idle in top(1) is 20/30/50. The question is - is the syscall and csw rates normal or should I be trying to tune mysql and php more agressively? I'm not hungry for performance (haven't hit the limit yet), but a couple of days ago the server stopped responding until a cold reboot (which is another story) - and now I'm paying closer attention to its vitals. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"