RAID10 stripe size and PostgreSQL performance
Ivan Voras
ivoras at freebsd.org
Fri Jul 12 13:55:43 UTC 2013
On 11/07/2013 23:07, Artem Naluzhnyy wrote:
> On Mon, Jul 8, 2013 at 6:16 PM, Ivan Voras <ivoras at freebsd.org> wrote:
>> On 08/07/2013 14:40, Artem Naluzhnyy wrote:
>>> Is this expected behavior with more than twice higher pgbench tps on
>>> 1MB stripe size?
>>
>> No, it is not.
>>
>> For start, can you please repeat your benchmarks but with restarting the
>> PostgreSQL server between each pgbench run?
>
> Fresh OS installation without DB warning, reboot after pgbench DB
> initialization (DB size: 26 GB) before benchmarking:
>
> * 32 KB (half of the UFS bsize) - tps=198
>
> * 64 KB - tps=226
>
> * 128 KB (default for the RAID controller) - tps=298
>
> * 1 MB (max for the RAID controller) - tps=347
I just looked at your RAID configuration at http://pastebin.com/F8uZEZdm
and you have a mirror of stripes (RAID-01) nor a stripe of mirrors
(RAID-10). And apparently, is I parse your configuration correctly, you
have a 1M stripe in the MIRROR part of the RAID, and an unknown stripe
size in the STRIPE part.
Mirroring may halp your read performance, but will not help your write
performance. If you are running pgbench with default settings, and with
your test database size which can fit in RAM, you probably cache all
reads eventually and then writes become the bottleneck.
>> Also, you should make sure that the database is located on the same
>> location on the disk platters by e.g. creating a small partition which
>> is about 150% larger than your pgbench database (and your pgbench
>> database should be at least 2x larger than your RAM, if you are going to
>> benchmark IO and not memory caches), which is located at the same
>> position (byte offset) in your RAID10 volume.
>
> Unfortunately it's not that easy to make a custom partitioning.
> However, all tests were done just after the server reinstallation
> using exactly the same order of commands.
I'm not saying that your production database should be on a custom
partition, but your pgbench test database (and the file for the
following test) should.
Anyway, could you please do one more test:
1) create a large file with "dd if=/dev/zero of=file bs=1m count=48000"
2) install /usr/ports/benchmarks/randomio
3) run "randomio file 8 0.5 1 8192 10 10"
... and report the results.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-database/attachments/20130712/a66f792f/attachment.sig>
More information about the freebsd-database
mailing list