Randomly slow queries over TCP, but not on localhost - Mailing list pgsql-admin

From Ramiro Barreca
Subject Randomly slow queries over TCP, but not on localhost
Date
Msg-id CAO4Rs2=nMkv=Un05YF0T8aW2V+ww=8V=Zi-gmqEmdD=Jf=QUZA@mail.gmail.com
Whole thread Raw
Responses Re: Randomly slow queries over TCP, but not on localhost
List pgsql-admin
We have a 
* PG 8.4 server 
* 16GB RAM
* 16 CPU cores 
* Linux Centos 5 (2.6.18-406.el5.centos.plus kernel)
* max_connections: 800 (but never over 500. usually 300 to 400)

WE have detected randomly slow connections when accessing through the network (not at localhost)
We use a script with a loop calling the psql command running a simple "select 1 from table".

At localhost, the conection is a flash, showing in very few ms the result on screen.
When passing the parameter "-h" with its own IP addres it begin answering immediately, but suddenly it has a delay of 10 seconds or more to answer on 1 or 2 of 10 commands.

Our suspect is that ther is a problem with the network stack parameter, perhaps at kernel level.
May it be the truth?

Ramiro Barreca
rbarreca@gmail.com

pgsql-admin by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_upgrade from 9.3 to 9.4 fails
Next
From: Scott Whitney
Date:
Subject: Re: Randomly slow queries over TCP, but not on localhost