Re: Odd blocking (or massively latent) issue - even with EXPLAIN

From: "Martin French" <Martin(dot)French(at)romaxtech(dot)com>
To: Jim Vanns <james(dot)vanns(at)framestore(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org,pgsql-performance-owner(at)postgresql(dot)org
Subject: Re: Odd blocking (or massively latent) issue - even with EXPLAIN
Date: 2012-07-23 13:46:28
Message-ID: OF4731D4BD.B722B5CE-ON80257A44.004B3A30-80257A44.004BABD3@LocalDomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

<html><body><p><font size="2" face="sans-serif">Hi</font><br><br><tt><font size="2">&gt; <br>&gt; We're seeing SELECT statements and even EXPLAIN (no ANAYLZE) <br>&gt; statements hang indefinitely until *something* (we don't know what)<br>&gt; releases some kind of resource or no longer becomes a massive bottle<br>&gt; neck. These are the symptoms.<br></font></tt><br><tt><font size="2">Is this in pgAdmin? Or psql on the console?</font></tt><br><tt><font size="2"><br>&gt; However, the system seems healthy - no table ('heavyweight') locks are<br>&gt; held by any session (this happens with only a few connected sessions),<br>&gt; all indexes are used correctly, other transactions are writing data (we<br>&gt; generally only have a few sessions running at a time - perhaps 10) etc.<br>&gt; etc. In fact, we are writing (or bgwriter is), 2-3 hundred MB/s<br>&gt; sometimes.<br></font></tt><br><tt><font size="2">What is shown in &quot;top&quot; and &quot;iostat&quot; whilst the queries are running?</font></tt><br><br><tt><font size="2">&gt; <br>&gt; We regularly run vacuum analyze at quiet periods - generally 1-2s daily.<br>&gt; <br>&gt; These sessions (that only read data) that are blocked can block from<br>&gt; anything from between only 5 minutes to 10s of hours then miraculously<br>&gt; complete successfully at once.<br>&gt; <br></font></tt><br><tt><font size="2">Are any &quot;blockers&quot; shown in pg_stat_activity?<br></font></tt><br><tt><font size="2">&gt; <br>&gt; checkpoint_segments = 128<br>&gt; maintenance_work_mem = 256MB<br>&gt; synchronous_commit = off<br>&gt; random_page_cost = 3.0<br>&gt; wal_buffers = 16MB<br>&gt; shared_buffers = 8192MB<br>&gt; checkpoint_completion_target = 0.9<br>&gt; effective_cache_size = 18432MB<br>&gt; work_mem = 32MB<br>&gt; effective_io_concurrency = 12<br>&gt; max_stack_depth = 8MB<br>&gt; log_autovacuum_min_duration = 0<br>&gt; log_lock_waits = on<br>&gt; autovacuum_vacuum_scale_factor = 0.1<br>&gt; autovacuum_naptime = 8<br>&gt; autovacuum_max_workers = 4<br></font></tt><br><tt><font size="2">Memory looks reasonably configured to me. effective_cache_size is only an indication to the planner and is not actually allocated. <br></font></tt><br><tt><font size="2">Is anything being written to the logfiles?</font></tt><br><br><tt><font size="2">Cheers</font></tt><font face="sans-serif">=============================================

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(at)romaxtech(dot)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.
=================================================</font>
</body></html>

Attachment Content-Type Size
unknown_filename text/html 3.2 KB

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Andrew Dunstan 2012-07-23 13:47:16 Re: Checkpointer split has broken things dramatically (was Re: DELETE vs TRUNCATE explanation)
Previous Message Craig Ringer 2012-07-23 13:04:46 Re: Checkpointer split has broken things dramatically (was Re: DELETE vs TRUNCATE explanation)