Re: Large number of open(2) calls with bulk INSERT into empty table

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Florian Weimer <fweimer(at)bfk(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Large number of open(2) calls with bulk INSERT into empty table
Date: 2011-12-06 19:53:42
Message-ID: CA+TgmobRiGQH+GNC+vTmEf=AgknBirSEUy3PFg4MzpXTXmfLqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 6, 2011 at 7:12 AM, Florian Weimer <fweimer(at)bfk(dot)de> wrote:
> * Robert Haas:
>
>> I tried whacking out the call to GetPageWithFreeSpace() in
>> RelationGetBufferForTuple(), and also with the unpatched code, but the
>> run-to-run randomness was way more than any difference the change
>> made.  Is there a better test case?
>
> I think that if you want to exercise file system lookup performance, you
> need a larger directory, which presumably means a large number of
> tables.

OK. I created 100,000 dummy tables, 10,000 at a time avoid blowing up
the lock manager. I then repeated my previous tests, and I still
can't see any meaningful difference (on my MacBook Pro, running MacOS
X v10.6.8). So at least on this OS, it doesn't seem to matter much.
I'm inclined to defer putting any more work into it until such time as
someone can demonstrate that it actually causes a problem and provides
a reproducible test case. I don't deny that there's probably an
effect and it would be nice to improve this, but it doesn't seem worth
spending a lot of time on until we can find a case where the effect is
measurable.

On the other hand, the problem of the FSM taking up 24kB for an 8kB
table seems clearly worth fixing, but I don't think I have the cycles
for it at present. Maybe a TODO is in order.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-12-06 20:09:31 Re: ecmascript 5 DATESTYLE
Previous Message Tom Lane 2011-12-06 19:42:25 Re: should Makefile.custom be in source tree or in build tree?