Re: TCP Overhead on Local Loopback - Mailing list pgsql-performance

From Jeff Janes
Subject Re: TCP Overhead on Local Loopback
Date
Msg-id CAMkU=1xJfdwLKSKSnmZMxUM3qr_DqySdS=m5jjFUEUey1+dpRw@mail.gmail.com
Whole thread Raw
In response to TCP Overhead on Local Loopback  (Ofer Israeli <oferi@checkpoint.com>)
List pgsql-performance
On Sun, Apr 1, 2012 at 1:24 PM, Ofer Israeli <oferi@checkpoint.com> wrote:
> Hi all,
>
> We are running performance tests using PG 8.3 on a Windows 2008 R2 machine
> connecting locally over TCP.
> In our tests, we have found that it takes ~3ms to update a table with ~25
> columns and 60K records, with one column indexed.

I assume you mean 3ms per row, as per 3ms per 60,000 rows (or per
5,000 rows?) seems improbably fast.

> We have reached this number after many tweaks of the database configuraiton
> and one of the changes we made was to perform the updates in batches of 5K
> as opposed to the pervious transaction per event.  Note that our use of
> batches is to have only one transaction, but still each of the 5K events is
> independently SELECTing and UPDATEing records, i.e. it is not all contained
> in a stored procedure or such.
>
> Still these times are too high for us and we are looking to lower them and I
> am wondering about the TCP/IP overhead of passing the information back and
> forth.  Does anyone have any numbers in what the TCP could cost in the
> configuration mentioned above or pointers on how to test it?

Change all your updates to selects, with the same where clause.  If
doing that makes it much faster, TCP must not have been your
bottleneck.


Cheers,

Jeff

pgsql-performance by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: TCP Overhead on Local Loopback
Next
From: Cesar Martin
Date:
Subject: H800 + md1200 Performance problem