kris at FreeBSD.org
Fri Jan 11 09:15:11 PST 2008
Krassimir Slavchev wrote:
>> I have read all related threads about performance problems with multi
>> core systems but still have no idea what to do to make thinks better.
>> Below are results of testing postgresql on HP DL380G5 using sysbench.
>> The results are comparable to:
>> but the same tests running on the same hardware using Linux (kernel
>> 2.6.18-53.1.4.el5 SMP x86_64) are very different.
>> PostgreSQL is tuned equal.
Just to summarize some discussion we had off-list, this problem is now
resolved. It turned out to have two causes:
1) sysbench on linux was defaulting to using a unix domain socket to
communicate with pgsql, but FreeBSD was using TCP to 127.0.0.1. TCP has
much more overhead so performance was lower. Using --pgsql-host="" in
sysbench is the fix for this.
2) pgsql was not compiled with thread support enabled, which caused lots
of bad interactions with the threaded sysbench client. This probably
would have caused data corruption too (silent in this case because
nothing was checking the query responses). The fix was to recompile the
pgsql client and server with the THREADSAFE option enabled.
Krassimir reports that with these two fixes, the standard 7.0 kernel has
compared to Linux:
I think this is a satisfactory resolution :)
More information about the freebsd-stable