Re: [HACKERS] performance test - Mailing list pgsql-hackers

From Vadim Mikheev
Subject Re: [HACKERS] performance test
Date
Msg-id 36A3FBB6.B37475A3@krs.ru
Whole thread Raw
In response to performance test  (Michael Meskes <Michael.Meskes@usa.net>)
Responses Re: [HACKERS] performance test  (Bruce Momjian <maillist@candle.pha.pa.us>)
Re: [HACKERS] performance test  (Michael Meskes <Michael.Meskes@usa.net>)
List pgsql-hackers
Michael Meskes wrote:
> 
> I tried inserting 15000 tuples each in two tables via pgsql and timed it.
> After insertion I also created btree indeces on both tables.
> 
...
> 
> Then I switched to 6.5 without -F:
> real    2m35.833s
> user    0m2.900s
> sys     0m3.910s
> 
...
> 
> Then I switched on -F:
> real    1m11.573s
> user    0m3.150s
> sys     0m3.760s
> 
> I've seen even bigger advantages of -F.

You've seen disadvantages of our unperfect buffer manager -:)
When server need in buffer for new data comming and there is
no unused buffers in pool (i.e. - all buffers filled with new
data and marked as dirty), server gets some dirty buffer,
writes it AND FSYNC file. So, server does many fsyncs
even with BEGIN/END while should do _one_ fsync at COMMIT.

Having this problem fixed you wouldn't had so big difference
between -F and BEGIN/END-no-F.

Vadim


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] latest parser changes
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Postgres Speed or lack thereof