Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 46CAEB5D944 for ; Fri, 10 Jun 2011 09:10:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 19868-02 for ; Fri, 10 Jun 2011 12:10:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from elizabeth.gransy.com (elizabeth.gransy.com [89.187.132.199]) by mail.postgresql.org (Postfix) with ESMTP id 1F2F5B5DBD7 for ; Fri, 10 Jun 2011 09:10:06 -0300 (ADT) Received: from sq.gransy.com (localhost [127.0.0.1]) by elizabeth.gransy.com (Postfix) with ESMTP id F102315E4306; Fri, 10 Jun 2011 14:10:05 +0200 (CEST) Received: from 85.161.57.44 (SquirrelMail authenticated user tv@fuzzy.cz) by sq.gransy.com with HTTP; Fri, 10 Jun 2011 14:10:06 +0200 Message-ID: <243bcc276983a6b1e2bbc783c3a5b7db.squirrel@sq.gransy.com> In-Reply-To: <000601cc2761$a2e3a280$e8aae780$@devshock.com> References: <000601cc2761$a2e3a280$e8aae780$@devshock.com> Date: Fri, 10 Jun 2011 14:10:06 +0200 Subject: Re: how much postgres can scale up? From: tv@fuzzy.cz To: "Anibal David Acosta" Cc: pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201106/114 X-Sequence-Number: 44047 > I have a function in pgsql language, this function do some select to some > tables for verify some conditions and then do one insert to a table with > NO > index. Update are not performed in the function > > When 1 client connected postgres do 180 execution per second > With 2 clients connected postgres do 110 execution per second > With 3 clients connected postgres do 90 execution per second > > Finally with 6 connected clients postgres do 60 executions per second > (totally 360 executions per second) > > While testing, I monitor disk, memory and CPU and not found any overload. There's always a bottleneck - otherwise the system might run faster (and hit another bottleneck eventually). It might be CPU, I/O, memory, locking and maybe some less frequent things. > I know that with this information you can figure out somethigns, but in > normal conditions, Is normal the degradation of performance per connection > when connections are incremented? > Or should I spect 180 in the first and something similar in the second > connection? Maybe 170? > > > The server is a dual xeon quad core with 16 GB of ram and a very fast > storage > The OS is a windows 2008 R2 x64 Might be, but we need more details about how the system works. On Linux I'd ask for output from 'iostat -x 1' and 'vmstat 1' but you're on Windows so there are probably other tools. What version of PostgreSQL is this? What are the basic config values (shared_buffers, work_mem, effective_cache_size, ...)? Have you done some tuning? There's a wiki page about this: http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server Have you tried to log slow queries? Maybe there's one query that makes the whole workload slow? See this: http://wiki.postgresql.org/wiki/Logging_Difficult_Queries Tomas