I am using PGTune to help tune my web application using PostgreSQL 9.5
Some background – The web app is a real estate search site, with up to 200 active users during the day performing fairly complex location-based queries. GeoDjango is used to host the site.
My question is about tuning
max_connections. In PGTune, I noticed that when I increase
max_connections, the recommended
work_mem decreases. I had several questions in mind:
- As a rule of thumb, should you keep
max_connectionsas low as possible, to allow for more
work_memto be freed up for better performance for each individual query?
- For a website with up to 200 active users at a time, constantly performing queries – what number of
max_connectionsI should have?
- I currently have my
max_connectionsset to 500 and the recommended
work_memby PGTune is 8388kB. Is it worth reducing
max_connectionsto 400 or maybe 300, which allows me to increase