Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZhKqJ-0004RN-Lo for pgsql-performance@arkaria.postgresql.org; Wed, 30 Sep 2015 17:06:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZhKqJ-00087S-8F for pgsql-performance@arkaria.postgresql.org; Wed, 30 Sep 2015 17:06:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZhKqI-00087M-TA for pgsql-performance@postgresql.org; Wed, 30 Sep 2015 17:06:58 +0000 Received: from mx-out.zmailcloud.com ([192.198.85.98] helo=mx-out-1.zmailcloud.com) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZhKqB-0003Fj-I7 for pgsql-performance@postgresql.org; Wed, 30 Sep 2015 17:06:58 +0000 Received: from smtp.01.com (smtp.01.com [10.10.0.43]) by mx-out-1.zmailcloud.com (Postfix) with ESMTP id 73703563EB7; Wed, 30 Sep 2015 12:06:49 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id 6E150A02D4; Wed, 30 Sep 2015 12:06:49 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-1.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-1.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vxKhL_6qbGzF; Wed, 30 Sep 2015 12:06:49 -0500 (CDT) Received: from smtp.01.com (localhost [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id 3C042A0425; Wed, 30 Sep 2015 12:06:49 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-1.01.com (Postfix) with ESMTP id 257ACA0422; Wed, 30 Sep 2015 12:06:49 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-1.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-1.01.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id rTQzxW4-ofRl; Wed, 30 Sep 2015 12:06:48 -0500 (CDT) Received: from [192.168.47.105] (50-0-164-12.dsl.dynamic.fusionbroadband.com [50.0.164.12]) by smtp-out-1.01.com (Postfix) with ESMTPSA id 667C1A02D4; Wed, 30 Sep 2015 12:06:48 -0500 (CDT) Subject: Re: Queries Per Second (QPS) To: Adam Scott , pgsql-performance@postgresql.org References: From: Josh Berkus Organization: PostgreSQL Experts Inc. Message-ID: <560C16A6.1000004@agliodbs.com> Date: Wed, 30 Sep 2015 10:06:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 09/26/2015 09:24 AM, Adam Scott wrote: > How do we measure queries per second (QPS), not transactions per second, > in PostgreSQL without turning on full logging which has a performance > penalty and can soak up lots of disk space? Measure it from the client side. pgBench does this. If you mean on your production workload, then I recommend using a connection proxy which counts statements. A few exist for Postgres, for example: VividCortex: https://www.vividcortex.com/blog/2015/05/13/announcing-vividcortex-network-analyzer-mysql-postgresql/ WireShark: https://github.com/dalibo/pgshark You'd need to measure how much one of these tools affects your QPS, of course, but that should be easily measurable on a test system. Also, if the PostgresQL activity log is moved to a seperate SSD from the database storage, I've found overhead in writing to it to be less than 3% ... depending on the nature of your query traffic. Pathological situations are mainly databases which have a high volume of very long queries or failed connection attempts. > > We are using 8.4, but I'm interested in any version as well. You are aware that 8.4 is EOL, yes? Not to mention missing 5 years of performance improvements ... -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance