From: | Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com> |
---|---|
To: | Tomas Vondra <tv(at)fuzzy(dot)cz> |
Cc: | PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Huge number of INSERTs |
Date: | 2011-11-19 19:27:08 |
Message-ID: | CAFWfU=u6k8p6Qv=7VaJN+ba2j=OtDk+nOR1CVxcptNpqmNMtHg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Nov 18, 2011 at 10:41 AM, Tomas Vondra <tv(at)fuzzy(dot)cz> wrote:
>
> That has nothing to do with the inserts, it means the number of connection
> requests exceeds the max_connections. You've set it to 350, and that seems
> too high - the processes are going to struggle for resources (CPU, I/O and
> memory) and the scheduling gets expensive too.
>
> A good starting point is usually 2*(number of cores + number of drives)
> which is 16 or 24 (not sure what a "dual server" is - probably dual CPU).
> You may increase that if the database more or less fits into memory (so
> less I/O is needed).
Ok, there's just too much conflicting info on the web.
If I reduce the max_connections to 16, how does this reflect on the
Apache MaxClients? There's a school of thought that recommends that
MaxClients in Apache should be the same as max_connection in PGSQL.
But 16 for MaxClients with a prefork MPM would be disastrous. No?
Anyway, even if I do try 16 as the number, what about these settings:
work_mem
shared_buffers
effective_cache_size
With nginx and apache, and some other sundries, I think about 4-5GB is
left for PGSQL. This is 9.0.5. And all other details - Centos 5 on 64
bit, SCSI disks with RAID 10, 3Ware RAID controller...etc.
Any help on settings appreciated.
Thanks!
From | Date | Subject | |
---|---|---|---|
Next Message | Phoenix Kiula | 2011-11-19 19:29:38 | Logging not working |
Previous Message | Rob_pg | 2011-11-19 19:15:36 | Re: How could I find the last modified procedure in the database? |