Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2

Lists: pgsql-hackers
From: Mark Wong <markw(at)osdl(dot)org>
To: pgsql-hackers(at)postgresql(dot)org, testperf-general(at)pgfoundry(dot)org
Subject: 8.0beta5 results w/ dbt2
Date: 2004-11-30 00:01:29
Message-ID: 20041129160129.A27761@osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I have some initial results using 8.0beta5 with our OLTP workload.
Off the bat I see about a 23% improvement in overall throughput. The
most significant thing I've noticed was in the oprofile report where
FunctionCall2 and hash_seq_search have moved down the profile a bit.

Also, I have libc with symbols now so we can see what it's doing with
in the oprofile output.

8.0beta5 results:
http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/
throughput: 4076.97

8.0beta4 results:
http://www.osdl.org/projects/dbt2dev/results/dev4-010/191/
throughput: 3323.07

Mark


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Mark Wong <markw(at)osdl(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org, testperf-general(at)pgfoundry(dot)org
Subject: Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 02:50:51
Message-ID: 200411300250.iAU2ope10141@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Mark Wong wrote:
> I have some initial results using 8.0beta5 with our OLTP workload.
> Off the bat I see about a 23% improvement in overall throughput. The
> most significant thing I've noticed was in the oprofile report where
> FunctionCall2 and hash_seq_search have moved down the profile a bit.
>
> Also, I have libc with symbols now so we can see what it's doing with
> in the oprofile output.
>
> 8.0beta5 results:
> http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/
> throughput: 4076.97
>
> 8.0beta4 results:
> http://www.osdl.org/projects/dbt2dev/results/dev4-010/191/
> throughput: 3323.07

You saw an improvement of 23% from beta4 to beta5? I didn't think we
did any major performance changes between those releases. Tom?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Wong <markw(at)osdl(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org, testperf-general(at)pgfoundry(dot)org
Subject: Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 04:35:03
Message-ID: 6188.1101789303@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Mark Wong <markw(at)osdl(dot)org> writes:
> I have some initial results using 8.0beta5 with our OLTP workload.
> Off the bat I see about a 23% improvement in overall throughput.

Between beta4 and beta5? That's astonishing. We didn't really do very
much that was performance-focused. Digging in the CVS logs, I see only
some changes intended to speed up subtransaction commit, which I suppose
is not relevant to your benchmark, plus these two changes:

2004-11-16 22:13 neilc

* src/backend/access/: hash/hash.c, nbtree/nbtree.c:
Micro-optimization of markpos() and restrpos() in btree and hash
indexes. Rather than using ReadBuffer() to increment the reference
count on an already-pinned buffer, we should use
IncrBufferRefCount() as it is faster and does not require acquiring
the BufMgrLock.

2004-11-09 16:42 tgl

* src/backend/optimizer/util/clauses.c: Allow planner to fold
"stable" functions to constants when forming selectivity estimates,
per recent discussion.

Given the right sort of queries I suppose the second change might create
a significant improvement, but I wasn't expecting 23% on a
general-purpose benchmark...

regards, tom lane


From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 07:00:29
Message-ID: 87is7n95yq.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Mark Wong <markw(at)osdl(dot)org> writes:

> I have some initial results using 8.0beta5 with our OLTP workload.
> http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/
> throughput: 4076.97

Do people really only look at the "throughput" numbers? Looking at those
graphs it seems that while most of the OLTP transactions are fulfilled in
subpar response times, there are still significant numbers that take as much
as 30s to fulfil.

Is this just a consequence of the type of queries being tested and the data
distribution? Or is Postgres handling queries that could run consistently fast
but for some reason generating large latencies sometimes?

I'm concerned because in my experience with web sites, once the database
responds slowly for even a small fraction of the requests, the web server
falls behind in handling http requests and a catastrophic failure builds.

It seems to me that reporting maximum, or at least the 95% confidence interval
(95% of queries executed between 50ms-20s) would be more useful than an
overall average.

Personally I would be happier with an average of 200ms but an interval of
100-300ms than an average of 100ms but an interval of 50ms-20s. Consistency
can be more important than sheer speed.

--
greg


From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mark Wong <markw(at)osdl(dot)org>, testperf-general(at)pgfoundry(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 07:12:10
Message-ID: 1101798730.4686.16.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, 2004-11-30 at 04:35, Tom Lane wrote:
> Mark Wong <markw(at)osdl(dot)org> writes:
> > I have some initial results using 8.0beta5 with our OLTP workload.
> > Off the bat I see about a 23% improvement in overall throughput.
>
> Between beta4 and beta5? That's astonishing. We didn't really do very
> much that was performance-focused. Digging in the CVS logs, I see only
> some changes intended to speed up subtransaction commit, which I suppose
> is not relevant to your benchmark, plus these two changes:
>
> 2004-11-16 22:13 neilc
>
> * src/backend/access/: hash/hash.c, nbtree/nbtree.c:
> Micro-optimization of markpos() and restrpos() in btree and hash
> indexes. Rather than using ReadBuffer() to increment the reference
> count on an already-pinned buffer, we should use
> IncrBufferRefCount() as it is faster and does not require acquiring
> the BufMgrLock.
>
> 2004-11-09 16:42 tgl
>
> * src/backend/optimizer/util/clauses.c: Allow planner to fold
> "stable" functions to constants when forming selectivity estimates,
> per recent discussion.
>
> Given the right sort of queries I suppose the second change might create
> a significant improvement, but I wasn't expecting 23% on a
> general-purpose benchmark...

Hmm... well it is a GP benchmark, but the results are based upon the
performance of one transaction while in the presence of the other
workloads. Speed up New Order and the whole thing improves.

If you look at the graph of New Order response time distribution, the
higher result gives much more frequent sub-second response for 8.0beta5
and the hump at around 23secs has moved down to 14secs. Notably, the
payment transaction and stock level transaction have almost identical
response time peaks in both cases. Perhaps some interaction between them
has been slowing us down? Now its gone...

The results seem to be significantly different, so I believe the
results. Well done Mark - great new graphs. Any chance we could see the
graphs showing 0.5 sec bins on the x axis, with all data < 0.5 sec
removed from the graph so we can show the tail? Or point me at the data?

Very pleased....

This shows me one additional thing: we aren't using sufficiently good
instrumentation to understand where the problems lie.

--
Best Regards, Simon Riggs


From: "Michael Paesold" <mpaesold(at)gmx(dot)at>
To: "Mark Wong" <markw(at)osdl(dot)org>, <pgsql-hackers(at)postgresql(dot)org>, <testperf-general(at)pgfoundry(dot)org>
Subject: Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 07:34:20
Message-ID: 00b601c4d6af$0285a3b0$0a01a8c0@zaphod
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Mark Wong wrote:

>I have some initial results using 8.0beta5 with our OLTP workload.
> Off the bat I see about a 23% improvement in overall throughput. The
> most significant thing I've noticed was in the oprofile report where
> FunctionCall2 and hash_seq_search have moved down the profile a bit.
>
> Also, I have libc with symbols now so we can see what it's doing with
> in the oprofile output.
>
> 8.0beta5 results:
> http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/
> throughput: 4076.97
>
> 8.0beta4 results:
> http://www.osdl.org/projects/dbt2dev/results/dev4-010/191/
> throughput: 3323.07

Is it possible that there are some other differences effecting the result?
At "Table Blocks Read" there is a "history" table in #191, but it does not
show up in #199. Just a thought,... but can you explain, Mark?

Best Regards,
Michael


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Mark Wong <markw(at)osdl(dot)org>, pgsql-hackers(at)postgresql(dot)org, testperf-general(at)pgfoundry(dot)org
Subject: Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 15:57:02
Message-ID: 20631.1101830222@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Greg Stark <gsstark(at)mit(dot)edu> writes:
> Mark Wong <markw(at)osdl(dot)org> writes:
>> I have some initial results using 8.0beta5 with our OLTP workload.
>> http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/
>> throughput: 4076.97

> Do people really only look at the "throughput" numbers? Looking at those
> graphs it seems that while most of the OLTP transactions are fulfilled in
> subpar response times, there are still significant numbers that take as much
> as 30s to fulfil.

> Is this just a consequence of the type of queries being tested and the data
> distribution? Or is Postgres handling queries that could run consistently fast
> but for some reason generating large latencies sometimes?

Given the regular shape of the first graph (transactions/minute),
there's every reason to think that the slowdowns are caused by
checkpoint I/O storms. It would be worth the trouble to experiment
with adjusting the bgwriter parameters to even out the flow of write
operations. (I think I've already pointed out that the current defaults
for the bgwriter seem mighty conservative.)

regards, tom lane


From: Rod Taylor <pg(at)rbt(dot)ca>
To: Mark Wong <markw(at)osdl(dot)org>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>, testperf-general(at)pgfoundry(dot)org
Subject: Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 16:03:03
Message-ID: 1101830583.99116.89.camel@home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, 2004-11-29 at 16:01 -0800, Mark Wong wrote:
> I have some initial results using 8.0beta5 with our OLTP workload.
> Off the bat I see about a 23% improvement in overall throughput. The
> most significant thing I've noticed was in the oprofile report where
> FunctionCall2 and hash_seq_search have moved down the profile a bit.
>
> Also, I have libc with symbols now so we can see what it's doing with
> in the oprofile output.
>
> 8.0beta5 results:
> http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/
> throughput: 4076.97
>
> 8.0beta4 results:
> http://www.osdl.org/projects/dbt2dev/results/dev4-010/191/
> throughput: 3323.07

It appears that WAL archiving (archive_command) is configured in 191 and
disabled (unset) in 199. Perhaps this accounts for some of the
difference?

--


From: Mark Wong <markw(at)osdl(dot)org>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, testperf-general(at)pgfoundry(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 16:25:29
Message-ID: 20041130082529.A18011@osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Nov 30, 2004 at 07:12:10AM +0000, Simon Riggs wrote:
> If you look at the graph of New Order response time distribution, the
> higher result gives much more frequent sub-second response for 8.0beta5
> and the hump at around 23secs has moved down to 14secs. Notably, the
> payment transaction and stock level transaction have almost identical
> response time peaks in both cases. Perhaps some interaction between them
> has been slowing us down? Now its gone...
>
> The results seem to be significantly different, so I believe the
> results. Well done Mark - great new graphs. Any chance we could see the
> graphs showing 0.5 sec bins on the x axis, with all data < 0.5 sec
> removed from the graph so we can show the tail? Or point me at the data?

The data files used to generate the charts are here:
http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/driver/

For each transaction:
delivery.data
new_order.data
order_status.data
payment.data
stock_level.data

Mark


From: Mark Wong <markw(at)osdl(dot)org>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org, testperf-general(at)pgfoundry(dot)org
Subject: Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 16:41:33
Message-ID: 20041130084133.C18011@osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Nov 30, 2004 at 08:34:20AM +0100, Michael Paesold wrote:
> Mark Wong wrote:
>
>
> >I have some initial results using 8.0beta5 with our OLTP workload.
> > Off the bat I see about a 23% improvement in overall throughput. The
> > most significant thing I've noticed was in the oprofile report where
> > FunctionCall2 and hash_seq_search have moved down the profile a bit.
> >
> > Also, I have libc with symbols now so we can see what it's doing with
> > in the oprofile output.
> >
> > 8.0beta5 results:
> > http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/
> > throughput: 4076.97
> >
> > 8.0beta4 results:
> > http://www.osdl.org/projects/dbt2dev/results/dev4-010/191/
> > throughput: 3323.07
>
>
> Is it possible that there are some other differences effecting the result?
> At "Table Blocks Read" there is a "history" table in #191, but it does not
> show up in #199. Just a thought,... but can you explain, Mark?
>
> Best Regards,
> Michael

Ah, the chart differences are due to a faulty script. That should be
cleared up and updated shortly. As for other differences to the beta4
test, I ran the beta5 test for 30 minutes as opposed to 60,
random_page_cost=2 instead of 4, and I have archving disabled. I've
generally found the latter two settings to have minimal effects but I
can always reverify.

Mark


From: Mark Wong <markw(at)osdl(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org, testperf-general(at)pgfoundry(dot)org
Subject: Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 16:44:41
Message-ID: 20041130084441.D18011@osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Nov 30, 2004 at 10:57:02AM -0500, Tom Lane wrote:
> Greg Stark <gsstark(at)mit(dot)edu> writes:
> > Mark Wong <markw(at)osdl(dot)org> writes:
> >> I have some initial results using 8.0beta5 with our OLTP workload.
> >> http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/
> >> throughput: 4076.97
>
> > Do people really only look at the "throughput" numbers? Looking at those
> > graphs it seems that while most of the OLTP transactions are fulfilled in
> > subpar response times, there are still significant numbers that take as much
> > as 30s to fulfil.
>
> > Is this just a consequence of the type of queries being tested and the data
> > distribution? Or is Postgres handling queries that could run consistently fast
> > but for some reason generating large latencies sometimes?
>
> Given the regular shape of the first graph (transactions/minute),
> there's every reason to think that the slowdowns are caused by
> checkpoint I/O storms. It would be worth the trouble to experiment
> with adjusting the bgwriter parameters to even out the flow of write
> operations. (I think I've already pointed out that the current defaults
> for the bgwriter seem mighty conservative.)
>
> regards, tom lane

I do have bgwriter_delay increased to 10, per previous
recommendation, which did smooth out the throughput graph
considerably. I can continue to adjust those settings.

Mark


From: Mark Wong <markw(at)osdl(dot)org>
To: Rod Taylor <pg(at)rbt(dot)ca>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>, testperf-general(at)pgfoundry(dot)org
Subject: Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 16:55:01
Message-ID: 20041130085501.F18011@osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Nov 30, 2004 at 11:03:03AM -0500, Rod Taylor wrote:
> On Mon, 2004-11-29 at 16:01 -0800, Mark Wong wrote:
> > I have some initial results using 8.0beta5 with our OLTP workload.
> > Off the bat I see about a 23% improvement in overall throughput. The
> > most significant thing I've noticed was in the oprofile report where
> > FunctionCall2 and hash_seq_search have moved down the profile a bit.
> >
> > Also, I have libc with symbols now so we can see what it's doing with
> > in the oprofile output.
> >
> > 8.0beta5 results:
> > http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/
> > throughput: 4076.97
> >
> > 8.0beta4 results:
> > http://www.osdl.org/projects/dbt2dev/results/dev4-010/191/
> > throughput: 3323.07
>
> It appears that WAL archiving (archive_command) is configured in 191 and
> disabled (unset) in 199. Perhaps this accounts for some of the
> difference?
>

I've found the archiving to be about a 1% overhead and in all my
random testing since then I haven't seen evidence otherwise. Here's
a linke to that message:
http://archives.postgresql.org/pgsql-hackers/2004-09/msg00430.php

But I'll try again too as things may have changed.

Mark


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Wong <markw(at)osdl(dot)org>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org, testperf-general(at)pgfoundry(dot)org
Subject: Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 17:10:34
Message-ID: 21638.1101834634@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Mark Wong <markw(at)osdl(dot)org> writes:
> I do have bgwriter_delay increased to 10, per previous
> recommendation, which did smooth out the throughput graph
> considerably. I can continue to adjust those settings.

Please try a variety of settings and post your results. It would give
us some hard data to help in deciding what the defaults ought to be.
(I really doubt that the current defaults are reasonable...)

regards, tom lane


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mark Wong <markw(at)osdl(dot)org>, testperf-general(at)pgfoundry(dot)org, Greg Stark <gsstark(at)mit(dot)edu>
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 18:02:58
Message-ID: 200411301002.59335.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom,

> > I do have bgwriter_delay increased to 10, per previous
> > recommendation, which did smooth out the throughput graph
> > considerably.  I can continue to adjust those settings.
>
> Please try a variety of settings and post your results.  It would give
> us some hard data to help in deciding what the defaults ought to be.
> (I really doubt that the current defaults are reasonable...)

Doing a systematic progression test with bgwriter has been on my TODO list for
a while. Unfortunately, the Scalable Test Platform, which is designed for
short runs with no vaccuum isn't the best place for it. Mark and OSDL
allocated us a dedicated machine but I've been tied up with paid work for the
last 4 weeks and unable to finish the setup.

The idea is to have a machine that we can do 4-hour runs, with vacuum, of
different bgwriter, checkpoint, etc. settings. I've also built a 200GB DSS
database for doing some significant testing with DSS workloads after some of
the discussions around shared_buffers in November.

If anyone here has a great desire to write database-backed GUC test scripts
(pref in Perl) then please give me a buzz on the testperf project
(www.pgfoundry.org/testperf).

--
Josh Berkus
Aglio Database Solutions
San Francisco


From: Mark Wong <markw(at)osdl(dot)org>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: 8.0beta5 results w/ dbt2
Date: 2004-11-30 18:44:52
Message-ID: 20041130104452.A15968@osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Nov 30, 2004 at 02:00:29AM -0500, Greg Stark wrote:
> Mark Wong <markw(at)osdl(dot)org> writes:
>
> > I have some initial results using 8.0beta5 with our OLTP workload.
> > http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/
> > throughput: 4076.97
>
> Do people really only look at the "throughput" numbers? Looking at those
> graphs it seems that while most of the OLTP transactions are fulfilled in
> subpar response times, there are still significant numbers that take as much
> as 30s to fulfil.
>
> Is this just a consequence of the type of queries being tested and the data
> distribution? Or is Postgres handling queries that could run consistently fast
> but for some reason generating large latencies sometimes?
>
> I'm concerned because in my experience with web sites, once the database
> responds slowly for even a small fraction of the requests, the web server
> falls behind in handling http requests and a catastrophic failure builds.
>
> It seems to me that reporting maximum, or at least the 95% confidence interval
> (95% of queries executed between 50ms-20s) would be more useful than an
> overall average.
>
> Personally I would be happier with an average of 200ms but an interval of
> 100-300ms than an average of 100ms but an interval of 50ms-20s. Consistency
> can be more important than sheer speed.
>

Looking at just the throughput number is oversimplying it a bit. The
scale factor (size of the database) limits what your maximum
throughput can be with constraints on think times (delays between
transaction requests) and the number of terminals simulated, which is
also dictated by the size of the database. So given the throughput
with a scale factor (600 in these tests) you can infer whether or not
the response times are reasonable or not. At the 600 warehouse scale
factor, we could theoretically hit about 7200 new-order transactions
per minute. The math is roughly 12 * warehouses.

I do agree that reporting max response times and a confidence
interval (I have been meaning to report a 90th percentile number)
would be informative in addition to a mean. Instead I included the
distribution charts in the mean time...

Mark


From: Mark Wong <markw(at)osdl(dot)org>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: testperf-general(at)pgfoundry(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-12-06 17:42:06
Message-ID: 20041206094206.A19557@osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Nov 30, 2004 at 10:51:42PM +0000, Simon Riggs wrote:
> My suggestion: increase checkpoint_timeout to 600 secs, increase
> bgwriter parameters also, to reduce how frequently it is called, as well
> as increase the number of blocks per cycle.

Ok, here are a series of three tests varying the bgwriter_delay at 1,
50, and 100:
http://www.osdl.org/projects/dbt2dev/results/pgsql/bgwriter_delay/

I also reduced checkpoint_timeout to 600, where it was prevously at
1800 with the results I posted previously. The throughput changes
weren't significant and the oprofile data is more of less the same.
I'll try varying the bgwriter_maxpages next (that's the number of
blocks per cycle, right?)

Mark


From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Mark Wong <markw(at)osdl(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>, testperf-general(at)pgfoundry(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-12-06 17:43:16
Message-ID: 200412060943.16706.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Mark,

> Ok, here are a series of three tests varying the bgwriter_delay at 1,
> 50, and 100:
>         http://www.osdl.org/projects/dbt2dev/results/pgsql/bgwriter_delay/

Hmmm. Looks inconclusive. The differences between the runs are < 0.3%,
which is a margin of error by anyone's definition.

Will have to develop better tests ...

--
Josh Berkus
Aglio Database Solutions
San Francisco


From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Mark Wong <markw(at)osdl(dot)org>, testperf-general(at)pgfoundry(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-12-06 19:52:37
Message-ID: 1102362757.2893.19.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, 2004-12-06 at 17:43, Josh Berkus wrote:
> Mark,
>
> > Ok, here are a series of three tests varying the bgwriter_delay at 1,
> > 50, and 100:
> > http://www.osdl.org/projects/dbt2dev/results/pgsql/bgwriter_delay/
>
> Hmmm. Looks inconclusive. The differences between the runs are < 0.3%,
> which is a margin of error by anyone's definition.
>
> Will have to develop better tests ...

Josh is right - these are inconclusive. That usually means the other
settings are still very sub-optimal.

The graphs show the effect of checkpointing is still very large, so it
looks like the bgwriter is ineffective.

Varying bgwriter_maxpages upwards should take performance higher.

--
Best Regards, Simon Riggs


From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Mark Wong <markw(at)osdl(dot)org>
Cc: testperf-general(at)pgfoundry(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-12-06 21:28:15
Message-ID: 1102368495.2893.116.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, 2004-12-06 at 17:42, Mark Wong wrote:
> On Tue, Nov 30, 2004 at 10:51:42PM +0000, Simon Riggs wrote:
> > My suggestion: increase checkpoint_timeout to 600 secs, increase
> > bgwriter parameters also, to reduce how frequently it is called, as well
> > as increase the number of blocks per cycle.
>
> Ok, here are a series of three tests varying the bgwriter_delay at 1,
> 50, and 100:
> http://www.osdl.org/projects/dbt2dev/results/pgsql/bgwriter_delay/
>
> I also reduced checkpoint_timeout to 600, where it was prevously at
> 1800 with the results I posted previously. The throughput changes
> weren't significant and the oprofile data is more of less the same.
> I'll try varying the bgwriter_maxpages next (that's the number of
> blocks per cycle, right?)

Mark,

Few questions:

- can we put the logging to DEBUG1 please, so we can see the
checkpoints? ...and set debug_shared_buffers = 10

I don't understand why the checkpoints are so regular at 300 seconds if
the checkpoint_timeout is set to 1800 or other...exactly when and how
are those parameters provided to the server?

- can we set checkpoint_segments to 8192 just to see if that changes the
checkpoint frequency (it should)

- the log output shows the database starts about 4 hours before the main
test starts... err whats going on there? maybe we could get more tests
in if that time could be reduced

- the explain plan output is missing...
http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/db/plan0.out.gz

- the log output shows deadlocks occurring - is there something about
the application of DBT-2 which is actually causing contention? Might
that have changed between beta4 and beta5? The earlier lock waits we saw
("Exclusive Lock" thread) are likely to be related to that. Is there
some other artifact of the test that could cause this...random number
generator....etc. My understanding was that TPC-C didn't deadlock, but I
could be wrong there. This could easily be throwing off the test
results... usually to do with the order in which locks are occurring...
if its not, I hope its not a bug,,,

--
Best Regards, Simon Riggs


From: Mark Wong <markw(at)osdl(dot)org>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: testperf-general(at)pgfoundry(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-12-06 23:18:17
Message-ID: 20041206151817.A23265@osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Dec 06, 2004 at 09:28:15PM +0000, Simon Riggs wrote:
> Mark,
>
> Few questions:
>
> - can we put the logging to DEBUG1 please, so we can see the
> checkpoints? ...and set debug_shared_buffers = 10

Ok, will do.

> I don't understand why the checkpoints are so regular at 300 seconds if
> the checkpoint_timeout is set to 1800 or other...exactly when and how
> are those parameters provided to the server?

I don't think I do either. I always set the parameters by editing the
postgresql.conf file.

> - can we set checkpoint_segments to 8192 just to see if that changes the
> checkpoint frequency (it should)

Ok.

> - the log output shows the database starts about 4 hours before the main
> test starts... err whats going on there? maybe we could get more tests
> in if that time could be reduced

I start 5000 clients every 3 seconds. I tend to find if I start them
too fast, my client tends to start dropping connections. Maybe a
tcp/ip tuning problem between my client and driver.

> - the explain plan output is missing...
> http://www.osdl.org/projects/dbt2dev/results/dev4-010/199/db/plan0.out.gz

Ugh, I really do mean to fix that... Something changed so it's not
being captured at all. It really should be easy for me to fix.

> - the log output shows deadlocks occurring - is there something about
> the application of DBT-2 which is actually causing contention? Might
> that have changed between beta4 and beta5? The earlier lock waits we saw
> ("Exclusive Lock" thread) are likely to be related to that. Is there
> some other artifact of the test that could cause this...random number
> generator....etc. My understanding was that TPC-C didn't deadlock, but I
> could be wrong there. This could easily be throwing off the test
> results... usually to do with the order in which locks are occurring...
> if its not, I hope its not a bug,,,

Nothing that I can think of. Each thread is initialized with a
different random number seed so we shouldn't see any identicle
transactions occuring because of that.

Mark


From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Mark Wong <markw(at)osdl(dot)org>
Cc: testperf-general(at)pgfoundry(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-12-06 23:44:22
Message-ID: 1102376662.2893.142.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, 2004-12-06 at 23:18, Mark Wong wrote:
> On Mon, Dec 06, 2004 at 09:28:15PM +0000, Simon Riggs wrote:
> > Mark,
> >
> > Few questions:
> >

Thanks.

On the graphs... why do the graphs for Proc Utilisation, Index Scans
etc, only show first 300 secs of a 3600 sec long run? Are those axes
correct? (I understand seeing the ramp-up is important, I just want to
check the time axis).

What do you think the periodicity is on those graphs that has an order
of around 10 secs if that axis is correct?

Thats about every 400 transactions. Anybody?

--
Best Regards, Simon Riggs


From: Mark Wong <markw(at)osdl(dot)org>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: testperf-general(at)pgfoundry(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-12-06 23:54:15
Message-ID: 20041206155415.A30856@osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Dec 06, 2004 at 11:44:22PM +0000, Simon Riggs wrote:
> On the graphs... why do the graphs for Proc Utilisation, Index Scans
> etc, only show first 300 secs of a 3600 sec long run? Are those axes
> correct? (I understand seeing the ramp-up is important, I just want to
> check the time axis).
>
> What do you think the periodicity is on those graphs that has an order
> of around 10 secs if that axis is correct?
>
> Thats about every 400 transactions. Anybody?

Whoops! Those are supposed to be minutes. The granularity of the
intervals have always been 1 minute (60 seconds). I wonder why I put
seconds on the charts... I'll fix that too.

Mark


From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Mark Wong <markw(at)osdl(dot)org>
Cc: testperf-general(at)pgfoundry(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-12-07 09:12:18
Message-ID: 1102410738.2893.181.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, 2004-12-06 at 23:54, Mark Wong wrote:
> On Mon, Dec 06, 2004 at 11:44:22PM +0000, Simon Riggs wrote:
> > On the graphs... why do the graphs for Proc Utilisation, Index Scans
> > etc, only show first 300 secs of a 3600 sec long run? Are those axes
> > correct? (I understand seeing the ramp-up is important, I just want to
> > check the time axis).
> >
> > What do you think the periodicity is on those graphs that has an order
> > of around 10 secs if that axis is correct?
> >
> > Thats about every 400 transactions. Anybody?
>
> Whoops! Those are supposed to be minutes. The granularity of the
> intervals have always been 1 minute (60 seconds). I wonder why I put
> seconds on the charts... I'll fix that too.

OK...at least the results are starting to be coherent now...

All the graphs now show we have 3 main states:
1. normal running
2. a periodicity of about 7 per 5 mins: ~42 secs
3. a periodicity of about 5 mins

1 gives good performance, most transactions < 2 sec
2 gives mild performance reductions, blocking transactions for ~7 secs
3 gives bad performance reductions, blocking transactions for ~12 secs

We think effect 3 is a checkpoint...

Not sure, as yet, what is causing effect 2. It's not related to the
kernel, but is related to user CPU and I/O waits and effects all tables
in proportion to their overall I/O usage. Some evidence that it becomes
more pronounced as CPU utilisation peaks, possibly increasing slightly
in frequency once this occurs: maybe the cache filling?

Conjecture: effect 2 is caused by insufficient bgwriter activity. The
bgwriter writes less dirty blocks than are being written by users, so
the cache slowly fills with dirty blocks. Then user processes must write
their own dirty blocks to disk before we continue. [Not sure about this,
but conjecture at least covers: wierd periodicity, I/O effect, cache
full effect and the lack of impact of bgwriter parameter changes]

--
Best Regards, Simon Riggs


From: Mark Wong <markw(at)osdl(dot)org>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: testperf-general(at)pgfoundry(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-12-07 16:17:23
Message-ID: 20041207081723.A8521@osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Dec 07, 2004 at 09:12:18AM +0000, Simon Riggs wrote:
> Not sure, as yet, what is causing effect 2. It's not related to the
> kernel, but is related to user CPU and I/O waits and effects all tables
> in proportion to their overall I/O usage. Some evidence that it becomes
> more pronounced as CPU utilisation peaks, possibly increasing slightly
> in frequency once this occurs: maybe the cache filling?

I never vacuum during the test. Is it possible that all the updates
and inserts would affect this?

Mark


From: Mark Wong <markw(at)osdl(dot)org>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org, testperf-general(at)pgfoundry(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-12-09 21:21:45
Message-ID: 20041209132145.A26811@osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, Dec 06, 2004 at 07:52:37PM +0000, Simon Riggs wrote:
> Varying bgwriter_maxpages upwards should take performance higher.
>

I have 2 runs now. I for both tests, I have bgwriter_percent=100,
checkpoint_segments=8192, checkpoint_timout=600,
debug_shared_buffers=10, log_min_messages=debug1 and varied
bgwriter_maxpages.

http://www.osdl.org/projects/dbt2dev/results/dev4-010/206/
bgwriter_maxpages=100 (default)
throughput 3816.51

http://www.osdl.org/projects/dbt2dev/results/dev4-010/207/
bgwriter_maxpages=1000
throughput 3865.50

Another 1% change in overall throughput. I did catch in the oprofile
output that StrategyDirtyBufferList moved down the list a bit when I
increased bgwriter_maxpages.

Mark


From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Mark Wong <markw(at)osdl(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org, testperf-general(at)pgfoundry(dot)org
Subject: Checkpoint bugs?
Date: 2004-12-11 17:36:30
Message-ID: 1102786590.4037.1432.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, 2004-12-09 at 21:21, Mark Wong wrote:
> On Mon, Dec 06, 2004 at 07:52:37PM +0000, Simon Riggs wrote:
> > Varying bgwriter_maxpages upwards should take performance higher.
> >
>
> I have 2 runs now. I for both tests, I have bgwriter_percent=100,
> checkpoint_segments=8192, checkpoint_timout=600,
> debug_shared_buffers=10, log_min_messages=debug1 and varied
> bgwriter_maxpages.
>
> http://www.osdl.org/projects/dbt2dev/results/dev4-010/206/
> bgwriter_maxpages=100 (default)
> throughput 3816.51
>
> http://www.osdl.org/projects/dbt2dev/results/dev4-010/207/
> bgwriter_maxpages=1000
> throughput 3865.50
>
>
> Another 1% change in overall throughput. I did catch in the oprofile
> output that StrategyDirtyBufferList moved down the list a bit when I
> increased bgwriter_maxpages.

Checkpointing is occurring more frequently than it should be on these
tests. With a setting of checkpoint_segments = 8192 and
checkpoint_timeout = 600, it was expected to see checkpoints occurring
every 10 minutes. This is not the case - checkpoints occur every 6m 15s
(ish).

That seems to reveal possible problems with the Checkpoint code:

1. The checkpoint seems to be limited to recycling 255 files at every
checkpoint. That would correspond to a maximum checkpoint_segments value
of 511, though the setting for the run was 8192. (guc.c shows the max
value is INT_MAX and all other fields used to manipulate the value at C
int, so I can't see why this should be...)....bug?

2. There is at least one case where a checkpoint started *immediately*
after a checkpoint completed, i.e. less than 1 second between one ending
and another starting. That seems very wrong....bug?
http://www.osdl.org/projects/dbt2dev/results/dev4-010/207/db/log
2004-12-07 12:51:52

...or was that a manual checkpoint?

--
Best Regards, Simon Riggs


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Wong <markw(at)osdl(dot)org>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, testperf-general(at)pgfoundry(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-12-12 06:13:13
Message-ID: 25330.1102831993@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Mark Wong <markw(at)osdl(dot)org> writes:
> I never vacuum during the test. Is it possible that all the updates
> and inserts would affect this?

That's bad; first because it possibly *is* hurting performance, and
second because if it isn't, your results could legitimately be attacked
as not representing the long-term-sustainable performance of Postgres.
VACUUM is real, unavoidable overhead and so we have to account for it
honestly.

regards, tom lane


From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mark Wong <markw(at)osdl(dot)org>, testperf-general(at)pgfoundry(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [Testperf-general] Re: 8.0beta5 results w/ dbt2
Date: 2004-12-12 08:37:48
Message-ID: 1102840668.4037.1536.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sun, 2004-12-12 at 06:13, Tom Lane wrote:
> Mark Wong <markw(at)osdl(dot)org> writes:
> > I never vacuum during the test. Is it possible that all the updates
> > and inserts would affect this?
>
> That's bad; first because it possibly *is* hurting performance, and
> second because if it isn't, your results could legitimately be attacked
> as not representing the long-term-sustainable performance of Postgres.
> VACUUM is real, unavoidable overhead and so we have to account for it
> honestly.

Agreed.

There does seem to be a downward performance trend over the course of
the one-hour tests, fairly consistently across the tests I've seen. This
is from about ~4200 tpm peak to ~4000 tpm peak an hour later.

I suppose that could be the reason for some of the extended transaction
times - though I reported a clear peak in the txn freq/response time
graph (with delays of ~7s). If txn times were lengthening because of
vacuum, I wouldn't expect to see a peak, just a long tail on the
distribution (which we do see...)

--
Best Regards, Simon Riggs