postgresql-performance using sysbench
Claus Guttesen
kometen at gmail.com
Mon Jan 28 07:28:42 PST 2008
Hi.
I have a HP DL360 G5 with a p800 controller with 512 bbwc and a msa70
cabinet with eight 15K rpm sas-disks in raid 1+0. I installed FreeBSD
7.0 stable and ubuntu 7.10 server using postgresql 8.2.5 (from ports
on FreeBSD and as an install-option on ubuntu). Both releases are
amd64. Postgresql on FreeBSD was compiled with WITH_THREADSAFE=true
(/var/db/ports/postgresql82/options). The server is a two x quad-core
@ 2.33 GHz with 16 GB ram.
I installed RC1 and csup'ed to latest FreeBSD 7 stable and recompiled
world and kernel. Removed options and devices I don't need like msdos,
ntfs, nfs. Ubuntu is a stock install, ie. kernel-upgrade. Kernel does
not have WITNESS etc. Then I installed and ran sysbench on postgresql
using these settings:
Postgresql.conf is the stock-configuration as created when running
initdb except I raised shared_buffers = 128MB on both FreeBSD and
Ubuntu (and raised sysctl-values as well to accomodate the larger
shared_buffers).
sysbench --test=oltp --pgsql-user=claus --oltp-table-size=100000 prepare
After that I ran sysbench using this loop:
run=5
clients=50
for ((a=10; a<=$clients; a=a+2))
do
for ((b=1; b<=$run; b++))
do
psql -d sbtest -h localhost -U claus -c "vacuum analyse;"
sysbench --test=oltp --num-threads=${a} --pgsql-user=claus
--pgsql-host="" --max-time=300 --max-requests=10000
--oltp-table-size=100000 run >> sysbench-clients-${a}
done
done
Ubuntu 7.10:
grep "transactions:" sysbench-clients-24|sort
transactions: 10000 (2354.49 per sec.)
transactions: 10001 (2126.28 per sec.)
transactions: 10001 (2215.52 per sec.)
transactions: 10001 (2236.03 per sec.)
FreeBSD 7.0 stable as of Jan. 28'th:
grep "transactions:" sysbench-clients-24|sort
transactions: 10001 (1600.36 per sec.)
transactions: 10002 (1963.95 per sec.)
transactions: 10005 (1973.17 per sec.)
In other runs FreeBSD also seems to trail Ubuntu. Are there any knobs
I could try on FreeBSD?
--
regards
Claus
When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.
Shakespeare
More information about the freebsd-performance
mailing list