How to think about
  performance
        Selena Deckelmann
  PostgreSQL User Group Liaison
           postgresql.org

    ...
Hubris
Case Study:
How we are teaching
people to think about
    performance
PostgreSQL Portland
Performance Practice
       Project
Monthly meetings to talk about
        performance
Mark Wong




http://pugs.postgresql.org/blog/92
Meetings at Portland State University

Hardware donated by HP

Data center space from Command
Prompt, Inc.
Our data:

http://moourl.com/fsperf
What do we teach?
Bottlenecks
 Baselining
Constraints
Bottlenecks
sar
mpstat
iostat
vmstat
readprofile
Baselining
• Application-specific.
• Filesystem performance.
• Start from defaults.
• Change one thing at a time.
• Use Science.
Constraints
• Hardware
• Operating system
• Time/Money
• Patience
We need your help.
• Go through our data.
• Pose new questions.
• Ask us about running tests.
How Postgres thinks
about performance
Synchronized Scan
“Do you need to start
  at the beginning?”

• Have a sequential scan in progress?
• Piggy-back on that sequential scan.
• ...
HOT
“Don’t do something
  you don’t have to.”
• Heap Only Tuples (HOT)
• Have an UPDATE to a table that doesn’t
  affect an in...
Visibility Map
“Don’t do something
  you don’t have to.”
• Free Space Map shows space in table files
  that is available for reuse.
• Visi...
Thanks!
 Postgres BoF 7:30pm
     Camino Real
@selenamarie (identi.ca/twitter)
   selena@postgresql.org
How To Think About Performance
How To Think About Performance
Upcoming SlideShare
Loading in …5
×

How To Think About Performance

600 views
531 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
600
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

How To Think About Performance

  1. 1. How to think about performance Selena Deckelmann PostgreSQL User Group Liaison postgresql.org End Point Corporation
  2. 2. Hubris
  3. 3. Case Study: How we are teaching people to think about performance
  4. 4. PostgreSQL Portland Performance Practice Project Monthly meetings to talk about performance
  5. 5. Mark Wong http://pugs.postgresql.org/blog/92
  6. 6. Meetings at Portland State University Hardware donated by HP Data center space from Command Prompt, Inc.
  7. 7. Our data: http://moourl.com/fsperf
  8. 8. What do we teach?
  9. 9. Bottlenecks Baselining Constraints
  10. 10. Bottlenecks
  11. 11. sar mpstat iostat vmstat readprofile
  12. 12. Baselining
  13. 13. • Application-specific. • Filesystem performance. • Start from defaults. • Change one thing at a time. • Use Science.
  14. 14. Constraints
  15. 15. • Hardware • Operating system • Time/Money • Patience
  16. 16. We need your help.
  17. 17. • Go through our data. • Pose new questions. • Ask us about running tests.
  18. 18. How Postgres thinks about performance
  19. 19. Synchronized Scan
  20. 20. “Do you need to start at the beginning?” • Have a sequential scan in progress? • Piggy-back on that sequential scan. • Version 8.3
  21. 21. HOT
  22. 22. “Don’t do something you don’t have to.” • Heap Only Tuples (HOT) • Have an UPDATE to a table that doesn’t affect an index? • Don’t update the index. • Version 8.3
  23. 23. Visibility Map
  24. 24. “Don’t do something you don’t have to.” • Free Space Map shows space in table files that is available for reuse. • Visibility Map is a bitmap that tells whether or not a tuple is visible to all transaction ids. If marked visible, don’t bother VACUUMing. • Reduces VACUUM cost (less I/O) • Version 8.4 (beta out now!)
  25. 25. Thanks! Postgres BoF 7:30pm Camino Real @selenamarie (identi.ca/twitter) selena@postgresql.org

×