8.3 write performance
8.3 write performance
От:
Enrico Sirola <enrico.sirola@gmail.com>
Дата:
Hello, (you could receive this message twice - I have some email issues sorry) I'm setting up a new DB with Centos 5 (amd64) + postgresql 8.3 installed from the pgsql yum repository. This is a host dedicated to postgresql. From the benchmarks I found here and there on the web, and having digged a bit on the ML, it seems that I could expect something similar to 4000 tps with pgbench. The host is a HP DL580 G5, 8GB of RAM with 8x146G 10k SAS disks and 2x2.4GHz quad-code intel xeons, with a battery-backed P400/512MB controller. I tried two disk layout configurations: - raid 1 system - raid 1 for WAL - raid 10 (4 disks) for data and - raid 1 system - raid 10 (6 disks) WAL+data the FS is ext3 (without lvm) for all the db-related partitions, created with the following options -b 4096 -E stride=32 -j -m 10 -T largefile (the array stripe size is 128k) and mounted with noatime,data=writeback pgbench reports circa 2000 tps with a number of clients ranging from 2 to 12 and starts decreasing afterwards with the number of clients, for example I get 1200 tps with 50 clients. The relevant configuration items of the DB is like in the following (default values are not shown) ------------------------------------ max_connections = 100 shared_buffers = 2GB temp_buffers = 128MB work_mem = 8MB maintenance_work_mem = 128MB max_fsm_pages = 1000000 bgwriter_delay = 200ms fsync = on synchronous_commit = on wal_sync_method = fdatasync wal_buffers = 1024kB commit_delay = 100 checkpoint_segments = 128 effective_cache_size = 5GB constraint_exclusion = on -------------------------------------- I'm a bit worried about this 2k tps limit I hit regardless of the disk layout, and also by the fact that it seems someone else reported to have much better figures (4ktps) with similar hardware. Does anyone have hints/suggestions/advices about what could be further optimized? Thanks a lot for your help, Enrico
Re: 8.3 write performance
От:
Enrico Sirola <enrico.sirola@gmail.com>
Дата:
Hi, I follow up myself: I was using pgbench with the wrong scale size. With the configuration I posted before and scale=100 I Get the following: sudo -u postgres pgbench -c 10 -t 10000 -s 100 starting vacuum...end. transaction type: TPC-B (sort of) scaling factor: 100 number of clients: 10 number of transactions per client: 10000 number of transactions actually processed: 100000/100000 tps = 4399.753895 (including connections establishing) tps = 4405.228901 (excluding connections establishing) sudo -u postgres pgbench -c 50 -t 10000 -s 100 starting vacuum...end. transaction type: TPC-B (sort of) scaling factor: 100 number of clients: 50 number of transactions per client: 10000 number of transactions actually processed: 500000/500000 tps = 3208.532479 (including connections establishing) tps = 3211.816174 (excluding connections establishing) which I think is in line with the expectations. Thanks, e.