PTHREAD_YIELDLOOPS boosts mysql super-smack performance
David Xu
davidxu at FreeBSD.org
Tue Oct 30 19:30:44 PDT 2007
I did a simple mysql super-smack benchmark test on a Intel XEON machine,
the CPU has 4 cores:
CPU: Intel(R) Xeon(R) CPU 5130 @ 2.00GHz (1997.03-MHz)
I have set environment variable LIBPTHREAD_YIELDLOOPS to 30 and start
mysql server:
setenv LIBPTHREAD_YIELDLOOPS 30
/usr/local/etc/rc.d/mysql-server start
and repeat doing
#super-smack ./select-key.smack 10 20000
The result is very surprising:
# /usr/src/tools/tools/ministat/ministat normal.txt yield_30.txt
x normal.txt
+ yield_30.txt
+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| x x x
+
|
| x xxxx
+ + ++
|
|x x xxxxx x
+ + + ++ +
|
|x x xxxxxxx x x
+ + + ++++++ ++++ +++ ++
+|
| |___A___|
|________M_A_________|
|
+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
N Min Max Median Avg Stddev
x 30 44790.57 48609.38 45831.065 45910.616 745.54679
+ 30 60521.95 73090.6 66008.135 66254.815 1953.4324
Difference at 95.0% confidence
20344.2 +/- 764.241
44.3126% +/- 1.66463%
(Student's t, pooled s = 1478.47)
it seems over 44% performance is improved.
Regards,
David Xu
More information about the freebsd-threads
mailing list