sclorg / postgresql-container

PostgreSQL container images based on Red Hat Software Collections and intended for OpenShift and general usage. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
http://softwarecollections.org
Apache License 2.0
164 stars 216 forks source link

Change default value of checkpoint_segments to at least 10 for better performance? #318

Closed ghost closed 1 year ago

ghost commented 5 years ago

The Postgre official document recommends to set checkpoint_segments to at least 10, which improves the performance. "Unless you're running on a very small configuration, you'll almost certainly be better setting this to at least 10, which also allows usefully increasing the completion target. ".

I wonder if the default need to be changed for performance concern. Thanks.

praiskup commented 5 years ago

I wonder if the default need to be changed for performance concern.

Maybe, does your databases suffer from too frequent checkpoints?

OpenShift (or its users) is known to be hard on PostgreSQL server (restarts, kills, ...), so crash-recovery is pretty normal thing ... and larger checkpoint_segments will probably prolong the crash-recovery during container start-up.