pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karl Denninger <karl@denninger.net>
To: pgsql-performance@postgresql.org
Subject: Revisiting disk layout on ZFS systems
Date: Mon, 28 Apr 2014 10:47:38 -0500
Message-ID: <535E781A.5030708@denninger.net> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

I've been doing a bit of benchmarking and real-world performance 
testing, and have found some curious results.

The load in question is a fairly-busy machine hosting a web service that 
uses Postgresql as its back end.

"Conventional Wisdom" is that you want to run an 8k record size to match 
Postgresql's inherent write size for the database.

However, operational experience says this may no longer be the case now 
that modern ZFS systems support LZ4 compression, because modern CPUs can 
compress fast enough that they overrun raw I/O capacity. This in turn 
means that the recordsize is no longer the record size, basically, and 
Postgresql's on-disk file format is rather compressible -- indeed, in 
actual performance on my dataset it appears to be roughly 1.24x which is 
nothing to sneeze at.

The odd thing is that I am getting better performance with a 128k record 
size on this application than I get with an 8k one!  Not only is the 
system faster to respond subjectively and can it sustain a higher TPS 
load objectively but the I/O busy percentage as measured during 
operation is MARKEDLY lower (by nearly an order of magnitude!)

This is not expected behavior!

What I am curious about, however, is the xlog -- that appears to suffer 
pretty badly from 128k record size, although it compresses even 
more-materially; 1.94x (!)

The files in the xlog directory are large (16MB each) and thus "first 
blush" would be that having a larger record size for that storage area 
would help.  It appears that instead it hurts.

Ideas?

-- 
-- Karl
karl@denninger.net

Attachments:

  smime.p7s (application/pkcs7-signature, 2.6K) download

view thread (10+ messages)  latest in thread

Message-ID: <535E781A.5030708@denninger.net>
Permalink:  ../535E781A.5030708@denninger.net/
Also on:    postgresql.org/message-id/535E781A.5030708@denninger.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: karl@denninger.net
  Subject: Re: Revisiting disk layout on ZFS systems
  In-Reply-To: <535E781A.5030708@denninger.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox