Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 459D4B5DBC2 for ; Fri, 10 Jun 2011 10:02:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 94145-01 for ; Fri, 10 Jun 2011 13:02:00 +0000 (UTC) X-Greylist: delayed 00:05:06.012645 by SQLgrey-1.7.6 Received: from mail-gx0-f174.google.com (mail-gx0-f174.google.com [209.85.161.174]) by mail.postgresql.org (Postfix) with ESMTP id 8E53FB5DBC1 for ; Fri, 10 Jun 2011 10:02:00 -0300 (ADT) Received: by gxk21 with SMTP id 21so1740842gxk.19 for ; Fri, 10 Jun 2011 06:02:00 -0700 (PDT) Received: by 10.150.61.11 with SMTP id j11mr3010549yba.122.1307710613686; Fri, 10 Jun 2011 05:56:53 -0700 (PDT) Received: from AnibalVAIO ([190.128.222.90]) by mx.google.com with ESMTPS id f65sm1254410yhn.67.2011.06.10.05.56.50 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Jun 2011 05:56:52 -0700 (PDT) From: "Anibal David Acosta" To: Cc: References: <000601cc2761$a2e3a280$e8aae780$@devshock.com> <243bcc276983a6b1e2bbc783c3a5b7db.squirrel@sq.gransy.com> In-Reply-To: <243bcc276983a6b1e2bbc783c3a5b7db.squirrel@sq.gransy.com> Subject: Re: how much postgres can scale up? Date: Fri, 10 Jun 2011 08:56:50 -0400 Message-ID: <000f01cc276d$df82edc0$9e88c940$@devshock.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGVV9RYQGqh9nHidNYEIlkWfJ69yQFcAFsJlRlKI2A= Content-Language: es-py 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/117 X-Sequence-Number: 44050 The version is Postgres 9.0 Yes, I setup the postgres.conf according to instructions in the=20 http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server Cool, I will check this http://wiki.postgresql.org/wiki/Logging_Difficult_Queries Looks like great starting point to find bottleneck But so, Is possible in excellent conditions that two connections = duplicate the quantity of transactions per second? Thanks! -----Mensaje original----- De: tv@fuzzy.cz [mailto:tv@fuzzy.cz]=20 Enviado el: viernes, 10 de junio de 2011 08:10 a.m. Para: Anibal David Acosta CC: pgsql-performance@postgresql.org Asunto: Re: [PERFORM] how much postgres can scale up? > I have a function in pgsql language, this function do some select to=20 > some tables for verify some conditions and then do one insert to a=20 > table with NO index. Update are not performed in the function > > When 1 client connected postgres do 180 execution per second With 2=20 > clients connected postgres do 110 execution per second With 3 clients=20 > connected postgres do 90 execution per second > > Finally with 6 connected clients postgres do 60 executions per second=20 > (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=20 > in normal conditions, Is normal the degradation of performance per=20 > 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=20 > 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