From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | pinker <pinker(at)onet(dot)eu> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: core system is getting unresponsive because over 300 cpu load |
Date: | 2017-10-10 20:49:22 |
Message-ID: | CAOR=d=2_57x-V4T+7kUsYsKWAc3OGeApa76ch8med7=5_pWCcw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Oct 10, 2017 at 2:40 PM, pinker <pinker(at)onet(dot)eu> wrote:
> Hi to all!
>
> We've got problem with a very serious repetitive incident on our core
> system. Namely, cpu load spikes to 300-400 and the whole db becomes
> unresponsive. From db point of view nothing special is happening, memory
> looks fine, disks io's are ok and the only problem is huge cpu load. Kernel
> parameters that are increasing with load are always the same:
The solution here is to reduce the number of connections usually via
some kind of connection pooling. Any db server will have a max
throughput at around the number of cpu cores == connections (give or
take a factor of 2). Outside that performance falls off, and has a
very sharp knee on the other side as the # of conns goes up.
Reduce connections, db runs faster. Increase it slows until it
eventually falls over.
pgbouncer and pgpool II are useful on the db end, look at pooling
options on the app side as well.
From | Date | Subject | |
---|---|---|---|
Next Message | pinker | 2017-10-10 20:51:21 | Re: core system is getting unresponsive because over 300 cpu load |
Previous Message | pinker | 2017-10-10 20:40:07 | core system is getting unresponsive because over 300 cpu load |