Re: Benchmarking: How to identify bottleneck (limiting factor) and achieve "linear scalability"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




You could also try pg_test_fsync to get low-level information, to supplement the high level you get from pgbench.

Thanks for pointing me to this tool. never knew pg_test_fsync existed! I've run `pg_test_fsync -s 60` two times and this is the output - https://gist.github.com/saurabhnanda/b60e8cf69032b570c5b554eb50df64f8 I'm not sure what to make of it?

I don't know what to make of that either.  I'd expect fdatasync using two 8kB writes to be about the same throughput as using one 8kB write, but instead it is 4 times slower.  Also, I'd expect open_datasync to get slower by a factor of 2, not a factor of 8, when going from one to two 8kB writes (that is not directly relevant, as you aren't using open_datasync, but is curious nonetheless).  Is this reproducible with different run lengths?  I wonder if your write cache (or something) gets "tired" during the first part of pg_test_fsync and thus degrades the subsequent parts of the test.  I would say something in your IO stack is not optimal, maybe some component is "consumer grade" rather than "server grade".  Maybe you can ask Hetzner about that.


The effects of max_wal_size are going to depend on how you have IO configured, for example does pg_wal shared the same devices and controllers as the base data?  It is mostly about controlling disk usage and crash-recovery performance, neither of which is of primary importance to pgbench performance.

 The WAL and the data-directory reside on the same SSD disk -- is this a bad idea?

If you are trying to squeeze out every last bit of performance, then I think it is bad idea.  Or at least, something to try the alternative and see.  The flushing that occurs during checkpoints and the flushing that occurs for every commit can interfere with each other.
 
I was under the impression that smaller values for max_wal_size cause pg-server to do "maintenance work" related to wal rotation, etc. more frequently and would lead to lower pgbench performance.

If you choose ridiculously small values it would.  But once the value is sufficient, increasing it further wouldn't do much.  Given your low level of throughput, I would think the default is already sufficient. 
 
Thanks for including the storage info.  Nothing about it stands out to me as either good or bad, but I'm not a hardware maven; hopefully one will be reading along and speak up.


PS: Cc-ing the list back again because I assume you didn't intend for your reply to be private, right?

Yes, I had intended to include the list but hit the wrong button, sorry.

Cheers,

Jeff

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux