how to think about performance
TRANSCRIPT
How to think about performance
Selena DeckelmannPostgreSQL User Group Liaison
postgresql.org
End Point Corporation
Hubris
Case Study:How we are teaching people to think about
performance
PostgreSQL Portland Performance Practice
Project
Monthly meetings to talk about performance
http://pugs.postgresql.org/blog/92
Mark Wong
Meetings at Portland State University
Hardware donated by HP
Data center space from Command Prompt, Inc.
What do we teach?
BottlenecksBaselining
Constraints
Bottlenecks
sarmpstatiostatvmstatreadprofile
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.
• Version 8.3
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 index?
• Don’t update the index.
• Version 8.3
Visibility Map
“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!)
Thanks!Postgres BoF 7:30pm
Camino Real@selenamarie (identi.ca/twitter)