pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Vanns <james.vanns@framestore.com>
To: Martin French <Martin.French@romaxtech.com>
Cc: Jim Vanns <james.vanns@framestore.com>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-performance-owner@postgresql.org
Subject: Re: Odd blocking (or massively latent) issue - even with EXPLAIN
Date: Thu, 16 Aug 2012 17:14:36 +0100
Message-ID: <1345133676.8801.52.camel@sys367.ldn.framestore.com> (raw)
In-Reply-To: <OFD096C18F.C98A054A-ON80257A45.0032E783-80257A45.00332C2A@LocalDomain>
References: <1343032905.12579.3.camel@sys367.ldn.framestore.com>
	<OF4731D4BD.B722B5CE-ON80257A44.004B3A30-80257A44.004BABD3@LocalDomain>
	<1343054763.12579.110.camel@sys367.ldn.framestore.com>
	<OF7755750C.7073A920-ON80257A45.00249D8E-80257A45.00259C8D@LocalDomain>
	<1343119691.12579.151.camel@sys367.ldn.framestore.com>
	<OFD096C18F.C98A054A-ON80257A45.0032E783-80257A45.00332C2A@LocalDomain>

Hello again. So sorry for resurrecting such an old thread but the
problem still persists - I've just had very little to report on, until
now...

> > That latter test - won't that pretty much just read from the page
> cache?
> > 'sync' may well have forced dirty pages to disk but does it actually
> > evict them to?
> 
> Basically, the cache is avoided because of the size of the file.
> 6000000 blocks at 8k exceeds the size of RAM in the machine, so it
> *should* miss the cache and hit the disk directly. :)

OK, I did this during the problematic time and write speeds (sustained)
are in the order of 250MB/s :) It took just 3m21s to write all ~50GB. We
get read speeds of a wonderfully massive ~530MB/s - the whole file read
in just 1m30s. All metrics gathered with iostat -p <devices> -m 1.

Now, what I have noticed is this; we run two databases on this one
machine. One (DB) is completely operable in a normal way during the slow
period and the other is not. This (unresponsive) database has just two
client processes connected - one is writing, the other is (meant to be)
reading.

Neither registers in pg_locks - one does not block the other at the DB
level. However the write process (INSERTs) is writing between 5 and 10
MB/s. The read process (a SELECT or EXPLAIN) just spins the CPU at 100%
and register 0.0 MB/s - yet it should be reading *a lot* of data.

So does PostgreSQL somehow (or have I misconfigured it to) always
prioritise writes over reads?

I'm still at a loss!

Any further pointers would be appreciated.

Jim

PS. This is with the deadline scheduler and with each block device set
with --setra 8192.

> > Anyway, that is off topic... perhaps ;)
> > 
> > Thanks again,
> > 
> > Jim
> > 
> 
> Cheers
> 
> Martin ============================================= Romax Technology
> Limited Rutherford House Nottingham Science & Technology Park
> Nottingham, NG7 2PZ England Telephone numbers: +44 (0)115 951 88 00
> (main) For other office locations see:
> http://www.romaxtech.com/Contact =================================
> =============== E-mail: info@romaxtech.com Website: www.romaxtech.com
> ================================= ================ Confidentiality
> Statement This transmission is for the addressee only and contains
> information that is confidential and privileged. Unless you are the
> named addressee, or authorised to receive it on behalf of the
> addressee you may not copy or use it, or disclose it to anyone else.
> If you have received this transmission in error please delete from
> your system and contact the sender. Thank you for your cooperation.
> =================================================
> 

-- 
Jim Vanns
Systems Programmer
Framestore





view thread (14+ messages)

Message-ID: <1345133676.8801.52.camel@sys367.ldn.framestore.com>
Permalink:  ../1345133676.8801.52.camel@sys367.ldn.framestore.com/
Also on:    postgresql.org/message-id/1345133676.8801.52.camel@sys367.ldn.framestore.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: james.vanns@framestore.com, Martin.French@romaxtech.com, pgsql-performance-owner@postgresql.org
  Subject: Re: Odd blocking (or massively latent) issue - even with EXPLAIN
  In-Reply-To: <1345133676.8801.52.camel@sys367.ldn.framestore.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