RAID10 stripe size and PostgreSQL performance

Artem Naluzhnyy tut at nhamon.com.ua
Thu Jul 11 21:08:01 UTC 2013


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


> 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.


The server has 24 GB RAM, so with 88 GB DB we have:

  * 32 KB stripe - tps=161

  * 1 MB stripe - tps=258


The server is used for VoIP billing, there are also lots of plain-text
log files dumping. Had it still better use 1 MB stripe size, or it
might have some side effects on performance.

-- 
Artem Naluzhnyy


More information about the freebsd-fs mailing list