Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E90A96328CC for ; Sat, 12 Jun 2010 17:46:41 -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 32734-10 for ; Sat, 12 Jun 2010 20:46:34 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mail.postgresql.org (Postfix) with ESMTP id AD95E632731 for ; Sat, 12 Jun 2010 17:46:34 -0300 (ADT) Received: from [192.168.1.6] (pool-96-244-14-10.bltmmd.fios.verizon.net [96.244.14.10]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0LwVC7-1PKy0P3HzD-017cAr; Sat, 12 Jun 2010 22:46:31 +0200 Message-ID: <4C13F225.5020400@2ndquadrant.com> Date: Sat, 12 Jun 2010 16:46:29 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Szymon Kosok CC: pgsql-performance@postgresql.org Subject: Re: ~400 TPS - good or bad? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+bHAUNiFm/UkAUGVKvrmS9/7PuW/KB/x2nVoX WQIfRWdnOWt5YFShRMc8MaTa6P9/KshaHyC7plqQiOvgPv19RA XlQTC9vaMUFO9+V7pIIYWjWPMJJNZrJ X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-10 required=5 tests=BAYES_40=-0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201006/224 X-Sequence-Number: 39080 Szymon Kosok wrote: > I've found in mailing list archive that scale = 1 is not good idea. So > we have ran pgbench -s 200 (our database is ~3 GB) -c 10 -t 3000 and > get about ~600 TPS. Good or bad? > pgbench in its default only really tests commit rate, and often that's not what is actually important to people. Your results are normal if you don't have a battery-backed RAID controller. In that case, your drives are only capable of committing once per disk rotation, so if you have 7200RPM drives that's no more than 120 times per second. On each physical disk commit, PostgreSQL will include any other pending transactions that are waiting around too. So what I suspect you're seeing is about 100 commits/second, and on average 6 of the 10 clients have something ready to commit each time. That's what I normally see when running pgbench on regular hard drives without a RAID controller, somewhere around 500 commits/second. If you change the number of clients to 1 you'll find out what the commit rate for a single client is, that should help validate whether my suspicion is correct. I'd expect a fairly linear increase from 100 to ~600 TPS as your client count goes from 1 to 10, topping out at under 1000 TPS even with much higher client counts. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us