X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 491889DC82D for ; Mon, 20 Feb 2006 20:21:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22971-01 for ; Mon, 20 Feb 2006 20:21:52 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.202]) by postgresql.org (Postfix) with ESMTP id EFEF49DC805 for ; Mon, 20 Feb 2006 20:21:47 -0400 (AST) Received: by zproxy.gmail.com with SMTP id k1so1101943nzf for ; Mon, 20 Feb 2006 16:21:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=GFbt8OQVq+Jl1I1zSslBa7/hYuxm3Dbt4kMm+VQsEz+aw2e53UvinL4G8HNvR+lJNix0dagz6tq1yOUdukjURIVoJu4Zc3dsPmrLwXljHkxHHkQSBp1x7QR6abBRMnVlBIkFQy0wF9z1bzGRf9DIyTlGo96YhMvfm+Uow8an/nw= Received: by 10.36.39.15 with SMTP id m15mr937028nzm; Mon, 20 Feb 2006 16:21:50 -0800 (PST) Received: from ?10.1.1.24? ( [203.217.18.65]) by mx.gmail.com with ESMTP id m2sm2655515nzf.2006.02.20.16.21.49; Mon, 20 Feb 2006 16:21:50 -0800 (PST) Message-ID: <43FA5D20.2080805@gmail.com> Date: Tue, 21 Feb 2006 11:21:52 +1100 From: Chris User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Marcos CC: pgsql-performance@postgresql.org Subject: Re: Creating a correct and real benchmark References: <1140432636.1170.6.camel@servidor> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.125 required=5 tests=[AWL=0.125] X-Spam-Score: 0.125 X-Spam-Level: X-Archive-Number: 200602/322 X-Sequence-Number: 17308 PFC wrote: > >> I'm developing a search engine using the postgresql's databas. I've >> already doing some tunnings looking increase the perform. >> >> Now, I'd like of do a realistic test of perfom with number X of queries >> for know the performance with many queries. >> >> What the corret way to do this? > > > > I guess the only way to know how it will perform with your own > application is to benchmark it with queries coming from your own > application. You can create a test suite with a number of typical > queries and use your favourite scripting language to spawn a number of > threads and hammer the database. I find it interesting to measure the > responsiveness of the server while torturing it, simply by measuring > the time it takes to respond to a simple query and graphing it. Also > you should not have N threads issue the exact same queries, because > then you will hit a too small dataset. Introduce some randomness in the > testing, for instance. Benchmarking from another machine makes sure the > test client's CPU usage is not a part of the problem. The other advice on top of this is don't just import a small amount of data. If your application is going to end up with 200,000 rows - then test with 200,000 rows or more so you know exactly how it will handle under "production" conditions.