how to think about performance

27
How to think about performance Selena Deckelmann PostgreSQL User Group Liaison postgresql.org End Point Corporation

Upload: perconaperformance

Post on 16-Jun-2015

427 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: How To Think About Performance

How to think about performance

Selena DeckelmannPostgreSQL User Group Liaison

postgresql.org

End Point Corporation

Page 2: How To Think About Performance

Hubris

Page 3: How To Think About Performance

Case Study:How we are teaching people to think about

performance

Page 4: How To Think About Performance

PostgreSQL Portland Performance Practice

Project

Monthly meetings to talk about performance

Page 5: How To Think About Performance

http://pugs.postgresql.org/blog/92

Mark Wong

Page 6: How To Think About Performance

Meetings at Portland State University

Hardware donated by HP

Data center space from Command Prompt, Inc.

Page 7: How To Think About Performance

http://moourl.com/fsperf

Our data:

Page 8: How To Think About Performance

What do we teach?

Page 9: How To Think About Performance

BottlenecksBaselining

Constraints

Page 10: How To Think About Performance

Bottlenecks

Page 11: How To Think About Performance

sarmpstatiostatvmstatreadprofile

Page 12: How To Think About Performance

Baselining

Page 13: How To Think About Performance

• Application-specific.

• Filesystem performance.

• Start from defaults.

• Change one thing at a time.

• Use Science.

Page 14: How To Think About Performance
Page 15: How To Think About Performance
Page 16: How To Think About Performance

Constraints

Page 17: How To Think About Performance

• Hardware

• Operating system

• Time/Money

• Patience

Page 18: How To Think About Performance

We need your help.

Page 19: How To Think About Performance

• Go through our data.

• Pose new questions.

• Ask us about running tests.

Page 20: How To Think About Performance

How Postgres thinks about performance

Page 21: How To Think About Performance

Synchronized Scan

Page 22: How To Think About Performance

“Do you need to start at the beginning?”

• Have a sequential scan in progress?

• Piggy-back on that sequential scan.

• Version 8.3

Page 23: How To Think About Performance

HOT

Page 24: How To Think About Performance

“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

Page 25: How To Think About Performance

Visibility Map

Page 26: How To Think About Performance

“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!)

Page 27: How To Think About Performance

Thanks!Postgres BoF 7:30pm

Camino Real@selenamarie (identi.ca/twitter)

[email protected]