Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 10:34 PM
Simon Riggs
 
Posts: n/a
Default Quality and Performance


Every release we seem to have the same debates about performance issues.

In 8.0 we shipped knowing that bgwriter had serious deficiencies, plus
had no way of logging SQL statements for performance tuning. In 8.2 we
even ended up tweaking the planner *after* release.

What I don't understand is all the words about quality, yet we don't
seem to include performance as part of that. Performance always seems to
be a "feature" that can be left until the next release and it's never
the right time to fix it.

I would hope to persuade all that Performance is an integral part of
Quality, not a hindrance to it.

I've never worked on a software project where either the Users or the
Sponsors said "don't worry about performance, it can wait, but I really
love the way you coded that". Quality is very, very high with Postgres,
but we also need to include performance as one of the Top Level concerns
*and* do that without dropping the ball on other concerns. That clearly
takes time and effort to balance those concerns.

We obviously need a performance build farm and I think everyone accepts
that. We just need to do it, so that's a given and is something I hope
to be involved in.

What I would really like to persuade everybody is that performance needs
specific attention. Once we've finished integrating the code, we're in
Beta and changes seem to be more difficult then. We must give time and
attention both to measuring performance and to fixing the things we
find. Sure we've done a lot of that, and I've been very happy with that,
but recent events make me think we have lapsed back into thinking that
performance is a threat to quality. I'd love to hear people say loud and
clear that performance matters and we can't ship when we know about
fixable performance holes.

Please can we clear some space in the next release schedule for
performance, plus give some credence to the thought that performance
issues rate our attention just as much as other kinds of bugs?

Maybe we should give each Beta a name, such as "Initial Beta",
"Performance Beta", "Usability Beta" as a way of encouraging folk to
focus onto particular aspects of quality at what we consider to be
appropriate times to do so. Not sure whether thats a good idea, but I'd
love to hear about ways to include performance as one of the essential
behaviours of PostgreSQL.

Your thoughts are welcome,

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 10:34 PM
Andrew Sullivan
 
Posts: n/a
Default Re: Quality and Performance

On Tue, Nov 27, 2007 at 05:32:49PM +0000, Simon Riggs wrote:
> What I would really like to persuade everybody is that performance needs
> specific attention.


[. . .]

> Your thoughts are welcome,


Well, one thing that might help is something of the specifics you mention.

I remember mentioning to Jan not long after he started at Afilias that we
occasionally saw strange behaviour that looked like "lock up". He was
slightly incredulous, and I didn't have time to build a repeatable test
case. So it was in the context of testing Slony that he discovered the dual
pains of buffer shuffling and checkpoint storms; this is part of what led
him to work on those problems in 8.0.

The key was to state, at the outset, "Here is the problem I want to fix."
By stating precisely and specifically what is to be fixed, the issue moves
from "performance needs" to a feature that can be implemented.

Perhaps now is the time to list some specific performance areas you want to
fix up?

A

--
Andrew Sullivan
Old sigs will return after re-constitution of blue smoke

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-15-2008, 10:34 PM
Simon Riggs
 
Posts: n/a
Default Re: Quality and Performance

On Tue, 2007-11-27 at 10:08 -0800, Joshua D. Drake wrote:
> Simon Riggs <simon@2ndquadrant.com> wrote:


> > Maybe we should give each Beta a name, such as "Initial Beta",
> > "Performance Beta", "Usability Beta" as a way of encouraging folk to
> > focus onto particular aspects of quality at what we consider to be
> > appropriate times to do so. Not sure whether thats a good idea, but
> > I'd love to hear about ways to include performance as one of the
> > essential behaviours of PostgreSQL.
> >
> > Your thoughts are welcome,

>
> Well I think that we do take performance into account. I agree
> that we should *never* have a regression in performance from release
> to release, which is what I believe has inspired this thread.
>
> However if you look at a lot of the items that have gone into this
> release they were all about performance:


Agreed. I either initiated or assisted with most of those items; but
that's not really my point, however because those were planned
performance "features".

My thinking was about how we handle the last minute attention to detail
that ensures we have performance everywhere, not just on the main
features.

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-15-2008, 10:34 PM
Andrew Dunstan
 
Posts: n/a
Default Re: Quality and Performance



Simon Riggs wrote:
>
> We obviously need a performance build farm and I think everyone accepts
> that. We just need to do it, so that's a given and is something I hope
> to be involved in.
>
>
>


It's on my list ... Had I but world enough and time ...

Performance testing can be bolted onto the exiting buildfarm as an
option. However, performance test machines have some requirements that
pure functional/build test machines don't have: especially stability. A
standard buildfarm client can be put on almost any machine and run
happily. My main workstation runs four buildfarm members including three
in a VM, and I never notice any impact. But a performance test machine
probably needs to be dedicated to just that function. And at least some
members of the performance test machines would need to be higher end
machines. The number of people who can afford such resources is much
lower than those who can run a relatively low impact simple buildfarm
member.

Maybe we also need to talk about running clients elsewhere for
performance testing too.

We also need to talk about what would be a good set of tests to run.

One useful thing this would buy us is a time series of test results so
we could easily see sudden degradations in performance. It must have
been annoying trying to triangulate performance dropoff recently.

cheers

andrew


---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-15-2008, 10:34 PM
Alvaro Herrera
 
Posts: n/a
Default Re: Quality and Performance

Joshua D. Drake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tue, 27 Nov 2007 17:32:49 +0000
> Simon Riggs <simon@2ndquadrant.com> wrote:
>
>
> > Maybe we should give each Beta a name, such as "Initial Beta",
> > "Performance Beta", "Usability Beta" as a way of encouraging folk to
> > focus onto particular aspects of quality at what we consider to be
> > appropriate times to do so. Not sure whether thats a good idea, but
> > I'd love to hear about ways to include performance as one of the
> > essential behaviours of PostgreSQL.

>
> Well I think that we do take performance into account. I agree
> that we should *never* have a regression in performance from release
> to release, which is what I believe has inspired this thread.


Hmm. I have developed several features that have driven performance
down. Autovacuum enabled by default for one. IIRC the SELECT FOR SHARE
stuff (tuple-level share locks) also hurt performance. Savepoints
required enlarging tuple headers, which also hurt performance.

In all cases we have gotten some other benefit, be it reduced
administrative pain, or reduced lock contention, or a new feature.

(In fact I think most performance drops have been my fault.)

--
Alvaro Herrera http://www.advogato.org/person/alvherre
"Some men are heterosexual, and some are bisexual, and some
men don't think about sex at all... they become lawyers" (Woody Allen)

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-15-2008, 10:34 PM
Tom Lane
 
Posts: n/a
Default Re: Quality and Performance

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Joshua D. Drake wrote:
>> Well I think that we do take performance into account. I agree
>> that we should *never* have a regression in performance from release
>> to release, which is what I believe has inspired this thread.


> Hmm. I have developed several features that have driven performance
> down.


Even changes that are not feature additions but intended solely to
improve performance may have corner cases where they are losses rather
than wins. I think "*never* have a regression in performance" is not
only pie-in-the-sky but would be a bad policy to adopt, because it
would mean for instance that we couldn't intentionally optimize common
cases at the expense of uncommon ones.

However, I think everybody agrees that getting blindsided by unexpected
performance dropoffs is a bad thing. We really need to reinstitute
the sort of daily (or near-daily) performance tracking that Mark Wong
used to be doing, and extend it to cover a wider variety of test cases
than just DBT-2. As an example, I'll bet that this issue of operator
lookup speed would never have been visible at all in DBT-2.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-15-2008, 10:34 PM
Simon Riggs
 
Posts: n/a
Default Re: Quality and Performance

On Tue, 2007-11-27 at 13:54 -0500, Tom Lane wrote:

> However, I think everybody agrees that getting blindsided by unexpected
> performance dropoffs is a bad thing. We really need to reinstitute
> the sort of daily (or near-daily) performance tracking that Mark Wong
> used to be doing, and extend it to cover a wider variety of test cases
> than just DBT-2. As an example, I'll bet that this issue of operator
> lookup speed would never have been visible at all in DBT-2.


Yeh, we need multiple large benchmarks run on a regular basis.

My understanding is the community has two 8-core servers to run
benchmarks on, but I'd quite like to have some details on where these
are at. One is likely to be running RHEL, one Solaris.

We also need performance regression tests, which is a slightly different
thing even if they do sound similar.

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-15-2008, 10:34 PM
Simon Riggs
 
Posts: n/a
Default Re: Quality and Performance

On Tue, 2007-11-27 at 13:32 -0500, Andrew Dunstan wrote:

> We also need to talk about what would be a good set of tests to run.


I think we should develop a series of performance regression tests that
can be run as an option on the buildfarm. We'd want a separate page for
that with graphs etc, as you suggest.

My vision for that is a set of tests that test very specific aspects of
code, much the same way as the regression tests attempt feature
coverage. Examples would be
- 10000 INSERTs
- 10000 INSERTs using multi-VALUEs clauses
- 100000 rows inserted by COPY
- 100000 rows inserted by CTAS

We would need a way to compare results between releases, so we can see
which aspects have regressed/improved, just as we have with the
buildfarm. That will also be food for release notes, where we can
mention all actions that are >5% faster, or anything we must regrettably
report as being slower.

Sounds like it's waiting on somebody to make the first move, so maybe I
should do that, then let everybody else chip into the framework.

Should we do this as part of core, or as a separate pgfoundry project?

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-15-2008, 10:34 PM
Simon Riggs
 
Posts: n/a
Default Re: Quality and Performance

On Tue, 2007-11-27 at 12:36 -0800, Joshua D. Drake wrote:

> The RHEL one as I know it, is the MyYearbook donated one. We are
> currently unaware of the status of that machine except to say it is
> currently running Gentoo.
>
> I don't know the status of the Solaris machine except that I think we
> had IO issues with it.


Might I enquire who has these machines, so I can ask them how can I get
access to them? Are they really Community systems? In what sense?

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-15-2008, 10:34 PM
Simon Riggs
 
Posts: n/a
Default Re: Quality and Performance

On Tue, 2007-11-27 at 15:33 -0300, Alvaro Herrera wrote:
> Joshua D. Drake wrote:
> I agree
> > that we should *never* have a regression in performance from release
> > to release, which is what I believe has inspired this thread.

>
> Hmm. I have developed several features that have driven performance
> down.


I think performance reductions as a result of additional functionality
are acceptable, but we should aim to minimise them.

It's the small things that crop up along the way that must be fixed,
with the same vigour we fix other bugs.

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:24 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596