PostgreSQL 7.4.1 incredibly slow :-(

From: Carlos Moreno <moreno(at)mochima(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: PostgreSQL 7.4.1 incredibly slow :-(
Date: 2004-01-05 00:58:03
Message-ID: 3FF8B69B.7090005@mochima.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi,

I'm experiencing some really odd behaviour after
upgrading to postgresql 7.4.1

We have three different machines:

1) Dual Athlon, 1GB RAM running RedHat 7.3 with
all the updates (kernel, glibc, gcc/g++ 2.96-113)

2) Single Pentium 1.7GHz, 512M RAM running RedHat
9 with all the updates.

3) Single Pentium 2GHz, 512M RAM running RedHat 7.3
with all the updates, and the compiler updated
from the source to gcc/g++ 3.2.2

We upgraded all of them to postgresql 7.4.1, installed
with:

./configure
make
make install

(i.e., all the default options)

Everything except local (i.e., non-TCP/IP) connections
has md5 authentication (this for the three machines).

On the dual Athlon (Murphy had to do it in a way
that maximizes the irony, of course! :-)), connections
through TCP/IP take forever! Even if they're local
connections (i.e., even if they come from 127.0.0.1)

If I run psql locally, when executed without switches,
it responds instantly (pg_hba.conf has an entry with
"ident sameuser" for local connections).

When executed with the -h localhost switch, it takes
exactly 30 seconds to prompt me for the password,
and once I enter the password, it takes another
30 seconds (*exactly* 30 seconds).

The pg_hba.conf files are identical (in fact, *really*
identical, as I discovered that TCP/IP connections
to the same machine are not seen by the server as
coming from 127.0.0.1, but coming from the other
IP address -- the "public" one; so I had to add
each machine's own addresses to the pg_hba.conf).

It doesn't look like it is RedHat's version making a
difference -- two of the machines have 7.3, and on
one of them, everything runs instantly)... Hmmm,
the compiler seems to be the only difference
between the two RH7.3 machines.

I doubt it has to do with firewalls (for one, the
connections are passing -- ipchains firewalls do not
simply add a delay; but also, it was working without
any delay before upgrading to 7.4.1)

Any ideas of what this could be? Any extra validations
or constraints in the new server-to-client protocol?
Those 30 seconds sound like a timeout of some sort,
but whatever it may be, it was not affecting the
previous setup, so I can't figure out what it could
be that I need to change.

Thanks for any ideas!

Carlos
--

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2004-01-05 01:09:48 Re: PostgreSQL 7.4.1 incredibly slow :-(
Previous Message Martijn van Oosterhout 2004-01-04 23:55:20 Re: GetLastInsertID ?