public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jeff Janes <[email protected]>
To: 우성민 <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Handling small inserts from many connections.
Date: Mon, 4 Sep 2017 15:27:06 -0700
Message-ID: <CAMkU=1yjYi93b9BnAn_mD8tJnnbRZmqK6jn0RzYQRu-pW_x=8Q@mail.gmail.com> (raw)
In-Reply-To: <CABdtbz0LZOEXYAh6f=PpLvF57jk2B4UOH2y5ETtHpv7ibu_17A@mail.gmail.com>
References: <CABdtbz0LZOEXYAh6f=PpLvF57jk2B4UOH2y5ETtHpv7ibu_17A@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgsql-performance>

On Mon, Sep 4, 2017 at 1:14 AM, 우성민 <[email protected]> wrote:

> Hi team,
>
> I'm trying to configure postgres and pgbouncer to handle many inserts from
> many connections.
>
> Here's some details about what i want to achieve :
>
>   We have more than 3000 client connections, and my server program forks
> backend process for each client connections.
>   If backend processes send a request to its connected client, the client
> send some text data(about 3000 bytes) to the backend process and wait for
>   next request.
>   The backend process execute insert text data using PQexec from libpq
> lbirary, if PQexec is done, backend process send request to
>   client again.
>
>   All the inserts using one, same table.
>
> The problem is, clients wait too long due to insert process is too slow.
> It seems to working fine at first, but getting slows down after couple of
> hours,
> each insert query takes 3000+ ms and keep growing.
>

If it takes a couple hours for it to slow down, then it sounds like you
have a leak somewhere in your code.

Run "top" and see who is using the CPU time (or the io wait time, if that
is what it is, and the memory)

Cheers,

Jeff


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Handling small inserts from many connections.
  In-Reply-To: <CAMkU=1yjYi93b9BnAn_mD8tJnnbRZmqK6jn0RzYQRu-pW_x=8Q@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox