pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: pgsql-performance@postgresql.org
Subject: Re: Perf decreased although server is better
Date: Wed, 2 Nov 2016 15:36:25 +0100
Message-ID: <c5f9b7ad-2773-7334-b37f-b40d23d24998@2ndquadrant.com> (raw)
In-Reply-To: <CAK6K-L+JvBEk0wA7KgKDCm=ORFvOuiBgf2r7por=D+hkyCTW3g@mail.gmail.com>
References: <CAK6K-L+JvBEk0wA7KgKDCm=ORFvOuiBgf2r7por=D+hkyCTW3g@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 11/02/2016 02:26 PM, Benjamin Toueg wrote:
> Hi everyone,
>
> I'm facing a peformance decrease after switching to a more performant
> VPS :
> http://serverfault.com/questions/812702/posgres-perf-decreased-although-server-is-better
>

Well, changing so many things at once (CPU, RAM, storage, Ubuntu 
version, probably kernel version, PostgreSQL version) is a bad idea, 
exactly because it makes investigating regressions more complicated.

> My questions are:
>
>  1. What benchmark should I perform before switching to a new server?

Three types of benchmarks, in this order:

1) system-level benchmarks to test various resources (fio to test disks, 
etc.)

2) general-purpose PostgreSQL benchmarks (regular pgbench, ...)

3) application-specific benchmarks, or at least pgbench with templates 
that match your workload somewhat better than the default one

Start with (1), compare results between machines, if it's OK start with 
(2) and so on.

>  2. What's your rule of thumb regarding my specific issue? What should
>     be investigated first?
>

There's a bottleneck somewhere. You need to identify which resource is 
it and why, until then it's just wild guessing. Try measuring how long 
the requests take at different points - at the app server, at the 
database, etc. That will tell you whether it's a database issue, a 
network issue etc. If the queries take longer on the database, use 
something like perf to profile the system.

ISTM it's not a disk issue (at least the chart shows minimum usage). But 
you're doing ~400tps, returning ~5M rows per second.

Also, if it turns out to be a database issue, more info about config and 
data set would be useful.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (11+ messages)  latest in thread

Message-ID: <c5f9b7ad-2773-7334-b37f-b40d23d24998@2ndquadrant.com>
Permalink:  ../c5f9b7ad-2773-7334-b37f-b40d23d24998@2ndquadrant.com/
Also on:    postgresql.org/message-id/c5f9b7ad-2773-7334-b37f-b40d23d24998@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com
  Subject: Re: Perf decreased although server is better
  In-Reply-To: <c5f9b7ad-2773-7334-b37f-b40d23d24998@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox