From: | Brian Ghidinelli <brian(at)pukkasoft(dot)com> |
---|---|
To: | sfpug(at)postgresql(dot)org |
Subject: | Benchmarking results, questions |
Date: | 2006-01-16 06:59:31 |
Message-ID: | 43CB4453.8030802@pukkasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | sfpug |
I recently acquired a new (used) machine to be used as a Postgres
server: Compaq DL380 G2 (2 x 1.44ghz, 1gb RAM) with 6 18gb 10k rpm
drives and a 32mb Smart Array 5i RAID controller. It's a clean install
of CentOS-4.2 with non-critical daemons disabled. After reading some
comments by Josh in the archives about the particularly poor performance
of 3-disk RAID-5 with PG, I ran some benchmarks today with pgbench with
1, 2, 5 and 10 concurrent connections. I dropped the testdb and
recreated it each time before running the test including reinitializing
it with pgbench (scaling set to 10). Each test ran 500 transactions 3
different times and the results were averaged. This is my first time
benchmarking postgres and I'm trying to be reasonably methodical.
My original plan was to run a 2-disk RAID-1 for the OS, a 3-disk RAID-5
and have a hot spare handy to minimize emergency trips to the colo. I
also considered 3 RAID-1 mirrors. Here are my baseline transactions per
second with the pg_xlog and data all on the 3-disk raid-5, ext3 mounted
with default settings:
c=1 c=2 c=5 c=10
79.6 68.6 74.0 74.4
It's too bad that postmaster -F doesn't seem to be reliable enough
because those same settings without sync were able to push through 620
tps with 2 users. Mounting ext3 with data=writeback was an improvement,
but still not great:
90.1 106.2 151.9 113.5
data=journal was predictably slow:
30.1 28.1 32.9 34.2
The next big change was keeping my data on the 3-disk RAID-5 and moving
the transaction log to the 2-disk RAID-1 for the OS. I'll only cover
the writeback case since it's the best (50% improvement):
c=1 c=2 c=5 c=10
137.6 150.1 251.1 160.5
I scrapped the RAID-5 and created 2 RAID-1 mirrors for a total of 3
RAID-1s. First I tried PG like this with everything on one array
(translog and data) and then on separate, dedicated RAID-1 arrays:
on one array:
127.1 152.1 258.5 190.8
on separate arrays:
146.8 155.6 227.2 198.2
I find the fairly small margin of difference between everything on one
RAID-1 and across two RAID-1s to be a bit surprising. It's oddly
close/slower/faster than the RAID5+RAID1 setup. Herein lies my questions:
* Why the closeness between RAID-1 with transaction log on the same
array vs. on a separate array? Not running enough transactions to see
the difference?
* Does it seem probable that in real-world use the RAID5 data + RAID1
transaction log would not perform as well as in this test? Having a hot
spare standby isn't such a bad thing if the trade-off is 3-5%.
* These are all with a default postgresql.conf. My plan was to test it
out of the box to determine filesystem/array setup first and then tune
the configuration after that. Does this approach make sense or am I
potentially masking some underlying issues?
I read an (oldish from Bill Moran) filesystem comparison with 7.x and it
seems like JFS was a speed demon (not done with pgbench):
<http://www.potentialtech.com/wmoran/postgresql.php#results>.
Unfortunately CentOS doesn't come with reiser, JFS or XFS by default.
Based on these results, I might try a 4-disk RAID-10 for the data and
put the transaction log on the OS RAID-1 to get minimal striping for the
data, although in real-world use, the OS disk would presumably be busier
and it may reduce some of the performance.
I know tuning is moot if you don't design the database well or properly
index but with a fresh server, it seemed like a good opportunity to
learn a thing or two. Any constructive input is appreciated.
Cheers,
Brian
From | Date | Subject | |
---|---|---|---|
Next Message | Sean Chittenden | 2006-01-17 18:41:22 | SV-RUG meeting tonight, 7pm in Santa Clara... |
Previous Message | Jon Asher | 2006-01-16 05:01:20 | Re: February Meeting Topic? |