pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
deadlock_timeout affect on performance 2+ messages / 2 participants [nested] [flat]
* deadlock_timeout affect on performance @ 2012-10-01 16:49 pg noob <pgnube@gmail.com> 2012-10-02 08:11 ` Re: deadlock_timeout affect on performance Heikki Linnakangas <hlinnakangas@vmware.com> 0 siblings, 1 reply; 2+ messages in thread From: pg noob @ 2012-10-01 16:49 UTC (permalink / raw) To: pgsql-performance Hi all, I have a question about the deadlock_timeout in regards to performance. Right now we have this timeout set at its default of 1s. My understanding of it is that this means that every 1 second the server will check for deadlocks. What I am wondering is how much of a performance improvement we would expect to get if this was raised to 30 seconds? Is it negligible or could it be a substantial performance improvement on a busy system? We very rarely have deadlocks and waiting 30 seconds to discover one doesn't seem too bad. Thank you. ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: deadlock_timeout affect on performance 2012-10-01 16:49 deadlock_timeout affect on performance pg noob <pgnube@gmail.com> @ 2012-10-02 08:11 ` Heikki Linnakangas <hlinnakangas@vmware.com> 0 siblings, 0 replies; 2+ messages in thread From: Heikki Linnakangas @ 2012-10-02 08:11 UTC (permalink / raw) To: pg noob <pgnube@gmail.com>; +Cc: pgsql-performance On 01.10.2012 19:49, pg noob wrote: > Hi all, > > I have a question about the deadlock_timeout in regards to performance. > Right now we have this timeout set at its default of 1s. > My understanding of it is that this means that every 1 second the server > will check for deadlocks. Not quite. It means that when a backend gets blocked, waiting on a lock, it will check for deadlocks after waiting for 1 second. When no backend is waiting for a lock, there are no deadlock checks regardless of deadlock_timeout. > What I am wondering is how much of a performance improvement we would > expect to get if this was raised to 30 seconds? > Is it negligible or could it be a substantial performance improvement on a > busy system? > We very rarely have deadlocks and waiting 30 seconds to discover one > doesn't seem too bad. It's almost certainly negligible. If you regularly have deadlocks, it might even better for performance to make the timeout shorter than 1 s, so that deadlocks are detected earlier, and backends will spend less time deadlocked, and more time doing real work. Although I doubt it will make any meaningful difference either way. - Heikki ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-10-02 08:11 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2012-10-01 16:49 deadlock_timeout affect on performance pg noob <pgnube@gmail.com> 2012-10-02 08:11 ` Heikki Linnakangas <hlinnakangas@vmware.com>
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