pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Benjamin Krajmalnik <kraj@servoyant.com>
To: Benjamin Krajmalnik <kraj@servoyant.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Problem with pgstat timeouts
Date: Wed, 4 Jan 2012 10:54:52 -0700
Message-ID: <F4E6A2751A2823418A21D4A160B689888CA623@fletch.stackdump.local> (raw)
In-Reply-To: <F4E6A2751A2823418A21D4A160B689888CA5A0@fletch.stackdump.local>
References: <F4E6A2751A2823418A21D4A160B689888CA5A0@fletch.stackdump.local>

I have proceeded to do some more checking, and I see in iostat that the pg_xlog drive has a significantly higher busy state than before.  Whereas it was barely busy when we first spun up the server (total %busy since we started the server is about 6%) it is now in its 80's almost steady state.  We have a set of partitioned tables which are continuously updated, and based on the size of them they no longer fit in the shared memory which was allocated.  Pg_xlog is in a SAS RAID 1.  The server is set up with streaming replication to an identical server.  The one thing which I just checked is the RAID mode on the server.
db1# megacli64 -LDInfo -lAll -aAll
                                     

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 2.452 TB
State               : Optimal
Strip Size          : 256 KB
Number Of Drives per span:2
Span Depth          : 6
Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Access Policy       : Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None


Virtual Drive: 1 (Target Id: 1)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 418.656 GB
State               : Optimal
Strip Size          : 256 KB
Number Of Drives    : 2
Span Depth          : 1
Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Access Policy       : Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None

Is it possible that the WriteThrough is what is causing the high io (and maybe the pgstat wait timeouts as well)?
If this is the case, would it be safe to change the cache to Write back?

Additionally, and somewhat unrelated, is there anything special which I need to do when restarting the primary server vis-à-vis the streaming replication server?  In other words, if I were to restart the main server, will the streaming replication server reconnect and pick up once the primary comes online?




view thread (4+ messages)  latest in thread

Message-ID: <F4E6A2751A2823418A21D4A160B689888CA623@fletch.stackdump.local>
Permalink:  ../F4E6A2751A2823418A21D4A160B689888CA623@fletch.stackdump.local/
Also on:    postgresql.org/message-id/F4E6A2751A2823418A21D4A160B689888CA623@fletch.stackdump.local

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: kraj@servoyant.com
  Subject: Re: Problem with pgstat timeouts
  In-Reply-To: <F4E6A2751A2823418A21D4A160B689888CA623@fletch.stackdump.local>
  References: <F4E6A2751A2823418A21D4A160B689888CA5A0@fletch.stackdump.local> <F4E6A2751A2823418A21D4A160B689888CA623@fletch.stackdump.local>

* 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