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
Calpont
 
PPT
Building High Performance MySql Query Systems And Analytic Applications
guest40cda0b
 
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
Calpont
 
Building High Performance MySql Query Systems And Analytic Applications
guest40cda0b
 
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)

PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 

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