[PERFORM] Checkpoints and slow queries

2014-04-30 Thread Elanchezhiyan Elango
*Problem description:* After a few days of running in my test environment, a query timed out (query timeout=4mins). Also in general the queries were taking a lot longer than expected. The workload in my database is a write intensive workload. And the writes happen in a burst every 5 minutes. There

Re: [PERFORM] Checkpoints and slow queries

2014-04-28 Thread Tomas Vondra
On 28.4.2014 22:54, Jeff Janes wrote: > On Mon, Apr 28, 2014 at 1:41 PM, Tomas Vondra There's certainly something fishy, because although this is the supposed > configuration: > > checkpoint_segments = 250 > checkpoint_timeout = 1h > checkpoint_completion_target = 0.9 > >

Re: [PERFORM] Checkpoints and slow queries

2014-04-28 Thread Tomas Vondra
On 28.4.2014 07:50, Elanchezhiyan Elango wrote: > > So how much data in total are we talking about? > OK, so there are multiple tables, and you're updating 50k rows in all > tables in total? > > Every 5 minutes: 50K rows are updated in 4 tables. 2K rows are updated > in 39 tables. >

Re: [PERFORM] Checkpoints and slow queries

2014-04-28 Thread Tomas Vondra
Sorry, hit "send" too early by accident. On 28.4.2014 16:07, Tom Lane wrote: > Elanchezhiyan Elango writes: >>> The problem is that while this makes the checkpoints less >>> frequent, it accumulates more changes that need to be written to >>> disk during the checkpoint. Which means the impact mor

Re: [PERFORM] Checkpoints and slow queries

2014-04-28 Thread Jeff Janes
On Mon, Apr 28, 2014 at 1:41 PM, Tomas Vondra wrote: > On 28.4.2014 16:07, Tom Lane wrote: > > Elanchezhiyan Elango writes: > >>> The problem is that while this makes the checkpoints less > >>> frequent, it accumulates more changes that need to be written to > >>> disk during the checkpoint. Whi

Re: [PERFORM] Checkpoints and slow queries

2014-04-28 Thread Tomas Vondra
On 28.4.2014 16:07, Tom Lane wrote: > Elanchezhiyan Elango writes: >>> The problem is that while this makes the checkpoints less >>> frequent, it accumulates more changes that need to be written to >>> disk during the checkpoint. Which means the impact more severe. > >> True. But the checkpoints

Re: [PERFORM] Checkpoints and slow queries

2014-04-28 Thread Tom Lane
Elanchezhiyan Elango writes: >> The problem is that while this makes the checkpoints less frequent, it >> accumulates more changes that need to be written to disk during the >> checkpoint. Which means the impact more severe. > True. But the checkpoints finish in approximately 5-10 minutes every t

Re: [PERFORM] Checkpoints and slow queries

2014-04-27 Thread Elanchezhiyan Elango
> > The problem is that while this makes the checkpoints less frequent, it > accumulates more changes that need to be written to disk during the > checkpoint. Which means the impact more severe. True. But the checkpoints finish in approximately 5-10 minutes every time (even with checkpoint_complet

Re: [PERFORM] Checkpoints and slow queries

2014-04-27 Thread Tomas Vondra
On 27.4.2014 23:01, Elanchezhiyan Elango wrote: > (I am resending this question after waiting for several hours because > my previous mail got stalled probably because I didn't confirm my > email address after subscribing. So resending the mail. Sorry if this > is causing a double post.) > > *Pro

[PERFORM] Checkpoints and slow queries

2014-04-27 Thread Elanchezhiyan Elango
(I am resending this question after waiting for several hours because my previous mail got stalled probably because I didn't confirm my email address after subscribing. So resending the mail. Sorry if this is causing a double post.) *Problem description:* After a few days of running in my test env