Postgres almost twice as slow on Jenkins - non-durable mode

Hey, I noticed that posgresql tests are almost twice as slow on Jenkins. Tomer recently sent two great patches to speed up some tests and I think we should continue the push on getting tests back into reasonable test times.

Postsgres is stable RBDBM with many durability checks and options and it can be tuned specifically for non-durable operation which is a good fit for tests. I think we should be able to easily turn three of the six options to speed up postgres on jenkin nodes:

https://www.postgresql.org/docs/current/static/non-durability.html

The three which should be safe are fsync, synchronous_commit and full_page_writes. Can someone with jenkin access check if these are not yet turned off? I think we considered this some time ago.

While tuning pg on jenkins is definitely a Good IdeaTM, keep in mind that part of the reason they are slower is that we only run integration tests (which are very slow) on postgres.

:man_facepalming:

Note we already do some tuning of PostgreSQL on our slaves. It does follow a few of those recommendations but further patches welcome of course.

1 Like

There are few things that it should be known regarding Pg:

  1. C[R]UD takes longer then Read information, so the more data is written/updated the slower the response time.
  2. There is wiki page for tuning things up: https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
  3. There is ability to change the server settings on run-time using alter system https://www.postgresql.org/docs/9.4/static/sql-altersystem.html

Do you have knowledge what are the default settings and version of the Pg server?

Thanks, disregard OP - it’s the integration tests what makes it slow most likely. This looks like a sane setting for tests.

1 Like