From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: keepalives on MacOS X |
Date: | 2010-06-29 14:28:33 |
Message-ID: | AANLkTimXNKYlm9dnynIceskHoNP4-RQNLrdpLbX9YrDq@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jun 29, 2010 at 12:42 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Yeah, a bit of rooting around in the Darwin sources shows that this
> value is used as a per-connection override for tcp_keepidle. So it
> is a synonym. Not sure if it's worth supporting when the other value
> can't be set too. Maybe it'd be more useful to document that people can
> set the system-wide values if they're desperate.
Well, the default value for tcp_keepidle is 2 hours, and the default
value for tcp_keepintvl is 75 seconds. Assuming that tcp_keepcount
defaults to something reasonable (I think the default on Linux is 9),
the lion's share of the time will be waiting for tcp_keepidle - so
just the ability to reduce that value to something reasonable should
help a lot. It's also not much code - proposed patch attached.
Some documentation of how to change this stuff via sysctl on various
OSes wouldn't be a bad thing either - anyone feel like writing
something up?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company
Attachment | Content-Type | Size |
---|---|---|
tcp_keepalive_for_keepidle.patch | application/octet-stream | 3.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-06-29 14:34:40 | Re: warning message in standby |
Previous Message | Kevin Grittner | 2010-06-29 14:21:54 | Re: warning message in standby |