wal_level=archive gives better performance than minimal - why?

From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: pgsql-performance(at)postgresql(dot)org
Subject: wal_level=archive gives better performance than minimal - why?
Date: 2012-01-12 23:17:22
Message-ID: 4F0F6A02.3000403@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi all,

I've run a series fo pgbench benchmarks with the aim to see the effect
of moving the WAL logs to a separate drive, and one thing that really
surprised me is that the archive log level seems to give much better
performance than minimal log level.

On spinning drives this is not noticeable, but on SSDs it's quite clear.
See for example this:

http://www.fuzzy.cz/tmp/tps-rw-minimal.png
http://www.fuzzy.cz/tmp/tps-rw-archive.png

That minimal log level gives about 1600 tps all the time, while archive
log level gives about the same performance at the start but then it
continuously increases up to about 2000 tps.

This seems very suspicious, because AFAIK the wal level should not
really matter for pgbench and if it does I'd expect exactly the opposite
behaviour (i.e. 'archive' performing worse than 'minimal').

This was run on 9.1.2 with two SSDs (Intel 320) and EXT4, but I do see
exactly the same behaviour with a single SSD drive.

The config files are here (the only difference is the wal_level line at
the very end)

http://www.fuzzy.cz/tmp/postgresql-minimal.conf
http://www.fuzzy.cz/tmp/postgresql-archive.conf

pgbench results and logs are here:

http://www.fuzzy.cz/tmp/pgbench.minimal.log.gz
http://www.fuzzy.cz/tmp/pgbench.archive.log.gz

http://www.fuzzy.cz/tmp/results.minimal.log
http://www.fuzzy.cz/tmp/results.archive.log

I do plan to rerun the whole benchmark, but is there any reasonable
explanation or something that might cause such behaviour?

kind regards
Tomas

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message alexandre - aldeia digital 2012-01-13 10:44:01 Re: Partitioning by status?
Previous Message Josh Berkus 2012-01-12 18:24:36 Re: Partitioning by status?