SlideShare a Scribd company logo
Scaling with Postgres Robert Treat Percona Performance Conference 2009
Disclaimer Every “really big” site uses custom solutions. Don’t expect to get there using out of the box software. You don’t have to reinvent the wheel. But you may have to build the car.
Who am I ? OmniTI TB+ databases top 100 websites Oracle/MySQL/Postgres Not necessarily in that order :-) P.S. We’re Hiring
Scaling Databases 101 Implementation Tuning Optimize Queries Optimize Schema Throw Hardware At It Caching Replication Federation
Implementation Normalization Foreign Keys Relational Modeling Mostly Irrelevant
Implementation Monitoring nagios, munin, etc..  check_postgres Trending cacti, noit watch your hardware!
Tuning Get the Basics Right http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server Someday Xlogs, Checkpoints Vacuum Strategy Costs and other Minutia
Optimize Queries explain explain analyze explain analyze verbose
Optimize Queries writing queries tuned to your databases planner
Optimize Schema indexing partial, functional fix data types add/remove tables de-normalize (maybe)
Why is this important? Postgres is good at scaling vertically Flawed database schema hides the real problems
Why is this unimportant? Optimizing is often a trade off of time vs. money It is not an ultimate solution
Throw Hardware At It Find your bottlenecks Memory / RAM CPU  I/O, DISKS  usually the biggest problem
Can you take me higher? 32 Cores 128 GB+ RAM Spindles out the wazoo tablespaces
Caching Internal materialized views External memcached, et al.  static files
Oh, the places you’ll go Nothing Fancy or Exciting Solid Engineering Understanding needs / limits Top 1000+ Website
Replication Ignore the hype Triggers won’t destroy your site Scripting solves a lot of config issues Telling your DBA to do his !@#$ job solves config issues too Add-on is FUD for Modular
Replication Truth in advertising Oracle does it better MySQL does it simpler
Replication Scaling Reads Master, many slaves Slony, Londiste, Bucardo, PGPoolII Scaling Writes Mostly impossible Bucardo, PGPoolII
What is Federation? A process for eliminating performance and/or scaleability as a requirement for your database
Federation MySQL software has no federation advantage MySQL community has large federation advantage
Federation Things to consider Horizontal Partitioning  Application Based Partitioning BASE  golconde, gearman
El Fin www.xzilla.net www.omniti.com www.postgresql.us
Postgres BOF Tonight @ 7:30 PM Location @ Camino Real

More Related Content

What's hot (11)

PDF
Propelling IoT Innovation with Predictive Analytics
SingleStore
 
TXT
Quick reference for curl
Rajkumar Asohan, PMP
 
PDF
ClickHouse Defense Against the Dark Arts - Intro to Security and Privacy
Altinity Ltd
 
PPTX
Scylla Summit 2018: Scylla 3.0 and Beyond
ScyllaDB
 
PPTX
Supercharge your Analytics with ClickHouse, v.2. By Vadim Tkachenko
Altinity Ltd
 
PDF
ClickHouse on Kubernetes! By Robert Hodges, Altinity CEO
Altinity Ltd
 
PDF
ClickHouse Introduction, by Alexander Zaitsev, Altinity CTO
Altinity Ltd
 
PDF
Hadoop 101 - Big Data Technology
Firman Gautama
 
PDF
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
Equnix Business Solutions
 
PPTX
Sql user group
Stefan Bauer
 
PDF
Analyzing MySQL Logs with ClickHouse, by Peter Zaitsev
Altinity Ltd
 
Propelling IoT Innovation with Predictive Analytics
SingleStore
 
Quick reference for curl
Rajkumar Asohan, PMP
 
ClickHouse Defense Against the Dark Arts - Intro to Security and Privacy
Altinity Ltd
 
Scylla Summit 2018: Scylla 3.0 and Beyond
ScyllaDB
 
Supercharge your Analytics with ClickHouse, v.2. By Vadim Tkachenko
Altinity Ltd
 
ClickHouse on Kubernetes! By Robert Hodges, Altinity CEO
Altinity Ltd
 
ClickHouse Introduction, by Alexander Zaitsev, Altinity CTO
Altinity Ltd
 
Hadoop 101 - Big Data Technology
Firman Gautama
 
PGConf.ASIA 2019 Bali - Tune Your LInux Box, Not Just PostgreSQL - Ibrar Ahmed
Equnix Business Solutions
 
Sql user group
Stefan Bauer
 
Analyzing MySQL Logs with ClickHouse, by Peter Zaitsev
Altinity Ltd
 

Viewers also liked (11)

PDF
Database Scalability Patterns
Robert Treat
 
PDF
Intro to pl/PHP Oscon2007
Robert Treat
 
PDF
A Guide To PostgreSQL 9.0
Robert Treat
 
PDF
What Ops Can Learn From Design
Robert Treat
 
PDF
Less Alarming Alerts - SRECon 2016
Robert Treat
 
PDF
Managing Databases In A DevOps Environment 2016
Robert Treat
 
PDF
Advanced WAL File Management With OmniPITR
Robert Treat
 
PDF
Think_your_Postgres_backups_and_recovery_are_safe_lets_talk.pptx
Payal Singh
 
PDF
Out of the box replication in postgres 9.4
Denish Patel
 
PDF
PostgreSQL 9.6 Performance-Scalability Improvements
PGConf APAC
 
PPTX
Backups
Payal Singh
 
Database Scalability Patterns
Robert Treat
 
Intro to pl/PHP Oscon2007
Robert Treat
 
A Guide To PostgreSQL 9.0
Robert Treat
 
What Ops Can Learn From Design
Robert Treat
 
Less Alarming Alerts - SRECon 2016
Robert Treat
 
Managing Databases In A DevOps Environment 2016
Robert Treat
 
Advanced WAL File Management With OmniPITR
Robert Treat
 
Think_your_Postgres_backups_and_recovery_are_safe_lets_talk.pptx
Payal Singh
 
Out of the box replication in postgres 9.4
Denish Patel
 
PostgreSQL 9.6 Performance-Scalability Improvements
PGConf APAC
 
Backups
Payal Singh
 
Ad

Similar to Scaling With Postgres (20)

PDF
5 Steps to PostgreSQL Performance
Command Prompt., Inc
 
PDF
Five steps perform_2009 (1)
PostgreSQL Experts, Inc.
 
PDF
Performance Whack A Mole
oscon2007
 
PDF
OSDC 2016 - Tuning Linux for your Database by Colin Charles
NETWAYS
 
PDF
Performance Whack-a-Mole Tutorial (pgCon 2009)
PostgreSQL Experts, Inc.
 
PDF
Getting 100B Metrics to Disk
jthurman42
 
PDF
Evolution of DBA in the Cloud Era
Mydbops
 
PPT
Building High Performance MySql Query Systems And Analytic Applications
guest40cda0b
 
PPT
Building High Performance MySQL Query Systems and Analytic Applications
Calpont
 
PDF
20141011 my sql clusterv01pptx
Ivan Ma
 
DOC
Quick guide to PostgreSQL Performance Tuning
Ron Morgan
 
PDF
Creating PostgreSQL-as-a-Service at Scale
Sean Chittenden
 
PDF
Tuning Linux for your database FLOSSUK 2016
Colin Charles
 
PPTX
High Performance and Scalability Database Design
Tung Ns
 
PDF
Performance Whackamole (short version)
PostgreSQL Experts, Inc.
 
PPTX
Fusion-io and MySQL at Craigslist
Jeremy Zawodny
 
PDF
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
ScyllaDB
 
PDF
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
PDF
The Accidental DBA
PostgreSQL Experts, Inc.
 
PPTX
Managing MySQL Scale Through Consolidation
NetApp
 
5 Steps to PostgreSQL Performance
Command Prompt., Inc
 
Five steps perform_2009 (1)
PostgreSQL Experts, Inc.
 
Performance Whack A Mole
oscon2007
 
OSDC 2016 - Tuning Linux for your Database by Colin Charles
NETWAYS
 
Performance Whack-a-Mole Tutorial (pgCon 2009)
PostgreSQL Experts, Inc.
 
Getting 100B Metrics to Disk
jthurman42
 
Evolution of DBA in the Cloud Era
Mydbops
 
Building High Performance MySql Query Systems And Analytic Applications
guest40cda0b
 
Building High Performance MySQL Query Systems and Analytic Applications
Calpont
 
20141011 my sql clusterv01pptx
Ivan Ma
 
Quick guide to PostgreSQL Performance Tuning
Ron Morgan
 
Creating PostgreSQL-as-a-Service at Scale
Sean Chittenden
 
Tuning Linux for your database FLOSSUK 2016
Colin Charles
 
High Performance and Scalability Database Design
Tung Ns
 
Performance Whackamole (short version)
PostgreSQL Experts, Inc.
 
Fusion-io and MySQL at Craigslist
Jeremy Zawodny
 
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
ScyllaDB
 
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
The Accidental DBA
PostgreSQL Experts, Inc.
 
Managing MySQL Scale Through Consolidation
NetApp
 
Ad

More from Robert Treat (18)

PDF
Advanced Int->Bigint Conversions
Robert Treat
 
PDF
Explaining Explain
Robert Treat
 
PDF
the-lost-art-of-plpgsql
Robert Treat
 
PDF
Managing Chaos In Production: Testing vs Monitoring
Robert Treat
 
PDF
Less Alarming Alerts!
Robert Treat
 
PDF
Big Bad "Upgraded" Postgres
Robert Treat
 
PDF
Managing Databases In A DevOps Environment
Robert Treat
 
PDF
The Essential PostgreSQL.conf
Robert Treat
 
PDF
Pro Postgres 9
Robert Treat
 
PDF
Scaling with Postgres (Highload++ 2010)
Robert Treat
 
PDF
Intro to Postgres 9 Tutorial
Robert Treat
 
PDF
Check Please!
Robert Treat
 
PDF
Intro to Postgres 8.4 Tutorial
Robert Treat
 
PDF
The Essential postgresql.conf
Robert Treat
 
PDF
PostgreSQL Partitioning, PGCon 2007
Robert Treat
 
ODP
Pro PostgreSQL, OSCon 2008
Robert Treat
 
PDF
Database Anti Patterns
Robert Treat
 
ODP
Pro PostgreSQL
Robert Treat
 
Advanced Int->Bigint Conversions
Robert Treat
 
Explaining Explain
Robert Treat
 
the-lost-art-of-plpgsql
Robert Treat
 
Managing Chaos In Production: Testing vs Monitoring
Robert Treat
 
Less Alarming Alerts!
Robert Treat
 
Big Bad "Upgraded" Postgres
Robert Treat
 
Managing Databases In A DevOps Environment
Robert Treat
 
The Essential PostgreSQL.conf
Robert Treat
 
Pro Postgres 9
Robert Treat
 
Scaling with Postgres (Highload++ 2010)
Robert Treat
 
Intro to Postgres 9 Tutorial
Robert Treat
 
Check Please!
Robert Treat
 
Intro to Postgres 8.4 Tutorial
Robert Treat
 
The Essential postgresql.conf
Robert Treat
 
PostgreSQL Partitioning, PGCon 2007
Robert Treat
 
Pro PostgreSQL, OSCon 2008
Robert Treat
 
Database Anti Patterns
Robert Treat
 
Pro PostgreSQL
Robert Treat
 

Recently uploaded (20)

PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
[GDGoC FPTU] Spring 2025 Summary Slidess
minhtrietgect
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pdf
ghjghvhjgc
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PPTX
Talbott's brief History of Computers for CollabDays Hamburg 2025
Talbott Crowell
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
PDF
NASA A Researcher’s Guide to International Space Station : Fundamental Physics
Dr. PANKAJ DHUSSA
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
Software Development Company Keene Systems, Inc (1).pdf
Custom Software Development Company | Keene Systems, Inc.
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PPTX
Manual Testing for Accessibility Enhancement
Julia Undeutsch
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
[GDGoC FPTU] Spring 2025 Summary Slidess
minhtrietgect
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pdf
ghjghvhjgc
 
Digital Circuits, important subject in CS
contactparinay1
 
Talbott's brief History of Computers for CollabDays Hamburg 2025
Talbott Crowell
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
NASA A Researcher’s Guide to International Space Station : Fundamental Physics
Dr. PANKAJ DHUSSA
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Software Development Company Keene Systems, Inc (1).pdf
Custom Software Development Company | Keene Systems, Inc.
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Manual Testing for Accessibility Enhancement
Julia Undeutsch
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 

Scaling With Postgres

  • 1. Scaling with Postgres Robert Treat Percona Performance Conference 2009
  • 2. Disclaimer Every “really big” site uses custom solutions. Don’t expect to get there using out of the box software. You don’t have to reinvent the wheel. But you may have to build the car.
  • 3. Who am I ? OmniTI TB+ databases top 100 websites Oracle/MySQL/Postgres Not necessarily in that order :-) P.S. We’re Hiring
  • 4. Scaling Databases 101 Implementation Tuning Optimize Queries Optimize Schema Throw Hardware At It Caching Replication Federation
  • 5. Implementation Normalization Foreign Keys Relational Modeling Mostly Irrelevant
  • 6. Implementation Monitoring nagios, munin, etc.. check_postgres Trending cacti, noit watch your hardware!
  • 7. Tuning Get the Basics Right http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server Someday Xlogs, Checkpoints Vacuum Strategy Costs and other Minutia
  • 8. Optimize Queries explain explain analyze explain analyze verbose
  • 9. Optimize Queries writing queries tuned to your databases planner
  • 10. Optimize Schema indexing partial, functional fix data types add/remove tables de-normalize (maybe)
  • 11. Why is this important? Postgres is good at scaling vertically Flawed database schema hides the real problems
  • 12. Why is this unimportant? Optimizing is often a trade off of time vs. money It is not an ultimate solution
  • 13. Throw Hardware At It Find your bottlenecks Memory / RAM CPU I/O, DISKS usually the biggest problem
  • 14. Can you take me higher? 32 Cores 128 GB+ RAM Spindles out the wazoo tablespaces
  • 15. Caching Internal materialized views External memcached, et al. static files
  • 16. Oh, the places you’ll go Nothing Fancy or Exciting Solid Engineering Understanding needs / limits Top 1000+ Website
  • 17. Replication Ignore the hype Triggers won’t destroy your site Scripting solves a lot of config issues Telling your DBA to do his !@#$ job solves config issues too Add-on is FUD for Modular
  • 18. Replication Truth in advertising Oracle does it better MySQL does it simpler
  • 19. Replication Scaling Reads Master, many slaves Slony, Londiste, Bucardo, PGPoolII Scaling Writes Mostly impossible Bucardo, PGPoolII
  • 20. What is Federation? A process for eliminating performance and/or scaleability as a requirement for your database
  • 21. Federation MySQL software has no federation advantage MySQL community has large federation advantage
  • 22. Federation Things to consider Horizontal Partitioning Application Based Partitioning BASE golconde, gearman
  • 23. El Fin www.xzilla.net www.omniti.com www.postgresql.us
  • 24. Postgres BOF Tonight @ 7:30 PM Location @ Camino Real