• 0 Posts
  • 148 Comments
Joined 2 years ago
cake
Cake day: December 2nd, 2023

help-circle








  • Why would you reserve ram for swap???

    You’re hindering the OS’s ability to manage memory.

    Put swap on disk. Aim for it to rarely be touched - but it needs to be there so the OS can move idle memory data out if it wants to.

    Don’t hard-allocate a memory partition for postgres. Let it allocate and free as it sees fit.

    Then the OS will naturally use all possible RAM for cache, with the freedom to use more or less for the server process as demand requires.

    Monitor queries to ensure you’re not seeing table scans due to missing indexes. Make sure VACUUM is happening either automatically or manually.