[GENERAL] Queries seldomly take 4s while normally take 1ms?

2013-04-09 Thread Christian Hammers
Hello I have a setup with one master and two slaves which are used by a closed source application. The database is asked the same query, a stored procedure, with different parameters about 4 million times per second at a peak rate of 150 times per second using 10 parallel connections. The slaves

Re: [GENERAL] Queries seldomly take 4s while normally take 1ms?

2013-04-09 Thread Greg Williamson
Christian -- original text snip because this POS editor won't let me properly edit postgres version ? type of replication ? changes from postgres config defaults ? Do they happen more at peak usage, semi regularly or sporadically ? Possibly some sporadic postgres process such as checkpoints

Re: [GENERAL] Queries seldomly take 4s while normally take 1ms?

2013-04-09 Thread Christian Hammers
Hello On Tue, 9 Apr 2013 03:53:13 -0700 (PDT) Greg Williamson gwilliamso...@yahoo.com wrote: Christian -- original text snip because this POS editor won't let me properly edit postgres version ? 9.2.3 type of replication ? As written, one master does streaming replication to two

Re: [GENERAL] Queries seldomly take 4s while normally take 1ms?

2013-04-09 Thread Kevin Grittner
Christian Hammers c...@lathspell.de wrote: 9.2.3 You really need to think about 9.2.4 Real Soon Now; there's a security fix that you probably should not wait on. max_connections = 1000  # (change requires restart) shared_buffers = 20GB  # min 128kB Those are

Re: [GENERAL] Queries seldomly take 4s while normally take 1ms?

2013-04-09 Thread Christian Hammers
On Tue, 9 Apr 2013 07:25:16 -0700 (PDT) Kevin Grittner kgri...@ymail.com wrote: Christian Hammers c...@lathspell.de wrote: 9.2.3 You really need to think about 9.2.4 Real Soon Now; there's a security fix that you probably should not wait on. Is scheduled (no access from outside to that

Re: [GENERAL] Queries seldomly take 4s while normally take 1ms?

2013-04-09 Thread Scott Marlowe
One of the most common causes I've seen for this is linux's vm.*dirty* settings to get in the way. Like so many linux kernel optimizations this one looks good on paper but gives at best middling improvements with occasional io storms that block everything else. On big mem machines doing a lot of

Re: [GENERAL] Queries seldomly take 4s while normally take 1ms?

2013-04-09 Thread Steven Schlansker
On Apr 9, 2013, at 11:25 AM, Scott Marlowe scott.marl...@gmail.com wrote: One of the most common causes I've seen for this is linux's vm.*dirty* settings to get in the way. Like so many linux kernel optimizations this one looks good on paper but gives at best middling improvements with

Re: [GENERAL] Queries seldomly take 4s while normally take 1ms?

2013-04-09 Thread Scott Marlowe
On Tue, Apr 9, 2013 at 12:37 PM, Steven Schlansker ste...@likeness.comwrote: On Apr 9, 2013, at 11:25 AM, Scott Marlowe scott.marl...@gmail.com wrote: One of the most common causes I've seen for this is linux's vm.*dirty* settings to get in the way. Like so many linux kernel optimizations