SSD benchmark results SSD - read-write pgbench

So let's see the next part of SSD results - read-write pgbench. Just like in case of a read-only benchmark, the performance of all file systems is almost exactly the same (with the exception of nilfs2, as mentioned later). The average performance looks like this

BTW I forgot to mention one important thing in the previous post - if you're interested in the data collected during the benchmark, I'm ready to provide them. There's one slight inconvenience, though - the HDD results occupy 3.4GB (1GB gzipped), SSD results occupy 38GB (10GB compressed). That's too much to place it to this blog. But if you're going to pgconf.eu in Amsterdam, just ask me ...

The performance boost compared to 7.2k SATA drive is about 13x, which is much lower than 25x speed-up observed in case of a read-only workload. Another thing that changed is that a much wider range of block sizes performs about equally - all the blocks between 1kB and 4kB perform about the same (with a read-only workload the 4kB blocks performed much better than the other block sizes).

What did not change is that all the file systems perform about the same, nevertheless the differences are a bit more visible. The best performance, as expected, is achieved with ext2

ext2 performance with a read-write workload

but the journaling ext4 is not significantly slower, especially the writeback/ordered data mode perform almost like a plain ext2

ext4 data=writeback performance with a read-write workload

ext4 data=ordered performance with a read-write workload

But with ext4 data=journal, the performance noticeably decreases (feature, not a bug).

ext4 data=journal performance with a read-write workload

The XFS performance is about equal to ext2 too (which is expected, as the journaling is similar to ext4 with a writeback data mode)

xfs performance with a read-write workload

The nilfs2 performance is really disappointing, especially considering how well it performed in the read-only benchmark.

nilfs2 performance with a read-write workload

The db cache hit ratio (not really surprisingly) behaves almost exactly as with a traditional drive

db cache hit ratio

The small differences (compared to results with a traditional HDD) are probably caused by a slightly modified random_page_cost value (decreased with the goal to prefer random I/O operations on SSD).

So let's see the tps for various file systems - first ext2, ext3 and ext4.

ext2 tps with a read-write workload

ext3 tps with a read-write workload

ext4 tps with a read-write workload

Obviously the basic behaviour is almost the same, but the variance of the tps values is decreasing over time so the course is getting smoother and smoother. XFS behaves about the same as ext4.

XFS performance with a read-write workload

Finally let's see nilfs2 that did not perform too well in this benchmark.

nilfs2 tps with a read-write workload

And just like in case of the read-only results, let's see the CPU utilization - this time it's quite obvious the CPU is not the bottleneck, because the utilization is about 80% all the time.

CPU utilization of the read-write benchmark with SSD

and this is the CPU utilization with a traditional drive

CPU utilization of the read-write benchmark with HDD

Obviously, the difference is not as significant as in case of the read-only workload.

Conclusions

  • The SSD provides an interesting boost, although a bit lower than with a read-only workload.
  • Blocks between 1kB and 4kB perform about the same, but considering that 4kB blocks provide the best read-only performance, it probably does not make sense to use other block sizes.
  • All the file systems perform about the same, with the exception of nilfs2.

Comments

There are no comments for this article (or are awaiting acceptance).

New comment

All the comments have to be accepted, so there may be some delay between submitting and accepting (or rejecting) the comment. If you enter the e-mail address, you will be informed about acceptance or rejection.

Subject or body may not contain HTML tags - they will be automatically removed. Paragraphs may be separated using a newline (ENTER).

(optional)