Skip site navigation (1) Skip section navigation (2)

TCP network cost

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: TCP network cost
Date: 2009-02-17 07:04:03
Message-ID: 20090217070403.GB2486@cooker (view raw or flat)
Thread:
Lists: pgsql-performance
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?

Ross
-- 
Ross Reedstrom, Ph.D.                                 reedstrm(at)rice(dot)edu
Systems Engineer & Admin, Research Scientist        phone: 713-348-6166
The Connexions Project      http://cnx.org            fax: 713-348-3665
Rice University MS-375, Houston, TX 77005
GPG Key fingerprint = F023 82C8 9B0E 2CC6 0D8E  F888 D3AE 810E 88F0 BEDE

Responses

pgsql-performance by date

Next:From: Rusty ConoverDate: 2009-02-17 07:20:02
Subject: Re: TCP network cost
Previous:From: Rajesh Kumar MallahDate: 2009-02-16 20:36:32
Subject: Re: suggestions for postgresql setup on Dell 2950 , PERC6i controller

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group