From: david@lang.hm
To: Rusty Conover <rconover@infogears.com>
Cc: Ross J. Reedstrom <reedstrm@rice.edu>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: TCP network cost
Date: Tue, 17 Feb 2009 00:34:15 -0800 (PST)
Message-ID: <alpine.DEB.1.10.0902170032440.25606@asgard.lang.hm> (raw)
In-Reply-To: <3FAF940B-9B0B-4DBA-8728-6096022129DF@infogears.com>
References: <20090217070403.GB2486@cooker>
<3FAF940B-9B0B-4DBA-8728-6096022129DF@infogears.com>
On Tue, 17 Feb 2009, Rusty Conover wrote:
> On Feb 17, 2009, at 12:04 AM, Ross J. Reedstrom wrote:
>
>> Recently I've been working on improving the performance of a system that
>> delivers files stored in postgresql as bytea data. I was surprised at
>> just how much a penalty I find moving from a domain socket connection to
>> a TCP connection, even localhost. For one particular 40MB file (nothing
>> outragous) I see ~ 2.5 sec. to download w/ the domain socket, but ~ 45 sec
>> for a TCP connection (either localhost, name of localhost, or from
>> another machine 5 hops away (on campus - gigabit LAN) Similar numbers
>> for 8.2.3 or 8.3.6 (on Linux/Debian etch + backports)
>>
>> So, why the 20 fold penalty for using TCP? Any clues on how to trace
>> what's up in the network IO stack?
>
> Try running tests with ttcp to eliminate any PostgreSQL overhead and find out
> the real bandwidth between the two machines. If its results are also slow,
> you know the problem is TCP related and not PostgreSQL related.
note that he saw problems even on localhost.
in the last couple of months I've seen a lot of discussin on the
linux-kernel list about the performance of localhost. unfortunantly those
fixes are only in the 2.6.27.x and 2.6.28.x -stable kernels.
David Lang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: david@lang.hm, rconover@infogears.com, reedstrm@rice.edu
Subject: Re: TCP network cost
In-Reply-To: <alpine.DEB.1.10.0902170032440.25606@asgard.lang.hm>
References: <20090217070403.GB2486@cooker> <3FAF940B-9B0B-4DBA-8728-6096022129DF@infogears.com> <alpine.DEB.1.10.0902170032440.25606@asgard.lang.hm>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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