Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 77E8DB5D94C for ; Fri, 10 Jun 2011 10:13:36 -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 09106-01 for ; Fri, 10 Jun 2011 13:13:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id 6D0A9B5D80A for ; Fri, 10 Jun 2011 10:13:29 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id 31F8210D; Fri, 10 Jun 2011 09:13:29 -0400 (EDT) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id f5bOOwesCrEP; Fri, 10 Jun 2011 09:13:28 -0400 (EDT) Received: from mail.postnewspapers.com.au (ppp171-128.static.internode.on.net [150.101.171.128]) by www.postnewspapers.com.au (Postfix) with ESMTP id E16792D; Fri, 10 Jun 2011 09:13:27 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 82F18AF4C6; Fri, 10 Jun 2011 21:13:24 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rbU8g-XCg4w4; Fri, 10 Jun 2011 21:13:18 +0800 (WST) Received: from [10.1.1.5] (124-169-230-7.dyn.iinet.net.au [124.169.230.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id 46309AF4C2; Fri, 10 Jun 2011 21:13:15 +0800 (WST) Message-ID: <4DF21862.3030008@postnewspapers.com.au> Date: Fri, 10 Jun 2011 21:13:06 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10 MIME-Version: 1.0 To: Anibal David Acosta CC: tv@fuzzy.cz, pgsql-performance@postgresql.org Subject: Re: how much postgres can scale up? References: <000601cc2761$a2e3a280$e8aae780$@devshock.com> <243bcc276983a6b1e2bbc783c3a5b7db.squirrel@sq.gransy.com> <000f01cc276d$df82edc0$9e88c940$@devshock.com> In-Reply-To: <000f01cc276d$df82edc0$9e88c940$@devshock.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/119 X-Sequence-Number: 44052 On 06/10/2011 08:56 PM, Anibal David Acosta wrote: > The version is Postgres 9.0 > Yes, I setup the postgres.conf according to instructions in the > 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? For two connections, if you have most of the data cached in RAM or you have lots of fast disks, then sure. For that matter, if they're synchronized scans of the same table then the second transaction might perform even faster than the first one! There are increasing overheads with transaction synchronization, etc with number of connections, and they'll usually land up contending for system resources like RAM (for disk cache, work_mem, etc), disk I/O, and CPU time. So you won't generally get linear scaling with number of connections. Greg Smith has done some excellent and detailed work on this. I highly recommend reading his writing, and you should consider buying his recent book "PostgreSQL 9.0 High Performance". See also: http://wiki.postgresql.org/wiki/Performance_Optimization There have been lots of postgresql scaling benchmarks done over time, too. You'll find a lot of information if you look around the wiki and Google. -- Craig Ringer