Upload
elliando-dias
View
1.766
Download
4
Tags:
Embed Size (px)
Citation preview
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.
Wednesday, April 22, 2009
Who am I ?
OmniTI
TB+ databases
top 100 websites
Oracle/MySQL/Postgres
Not necessarily in that order :-)
Wednesday, April 22, 2009
Scaling Databases 101Implementation
Tuning
Optimize Queries
Optimize Schema
Wednesday, April 22, 2009
Scaling Databases 101Implementation
Tuning
Optimize Queries
Optimize Schema
Throw Hardware At It
Caching
Wednesday, April 22, 2009
Scaling Databases 101Implementation
Tuning
Optimize Queries
Optimize Schema
Throw Hardware At It
Caching
Replication
Wednesday, April 22, 2009
Scaling Databases 101Implementation
Tuning
Optimize Queries
Optimize Schema
Throw Hardware At It
Caching
Replication
FederationWednesday, April 22, 2009
Implementation
Normalization
Foreign Keys
Relational Modeling
Mostly IrrelevantWednesday, April 22, 2009
Implementation Monitoring
nagios, munin, etc..
check_postgres
Trending
cacti, noit
watch your hardware!
Wednesday, April 22, 2009
TuningGet the Basics Right
http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
Wednesday, April 22, 2009
TuningGet the Basics Right
http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
Someday
Xlogs, Checkpoints
Vacuum Strategy
Costs and other Minutia
Wednesday, April 22, 2009
Optimize Schema
indexing
partial, functional
fix data types
add/remove tables
de-normalize (maybe)
Wednesday, April 22, 2009
Why is this important?
Postgres is good at scaling vertically
Flawed database schema hides the real problems
Wednesday, April 22, 2009
Why is this unimportant?
Optimizing is often a trade off of time vs. money
It is not an ultimate solution
Wednesday, April 22, 2009
Throw Hardware At It
Find your bottlenecks
Memory / RAM
CPU
I/O, DISKS
usually the biggest problem
Wednesday, April 22, 2009
Can you take me higher?
32 Cores
128 GB+ RAM
Spindles out the wazoo
tablespaces
Wednesday, April 22, 2009
CachingInternal
materialized views
External
memcached, et al.
static files
Wednesday, April 22, 2009
Oh, the places you’ll go
Nothing Fancy or Exciting
Solid Engineering
Understanding needs / limits
Wednesday, April 22, 2009
Oh, the places you’ll go
Nothing Fancy or Exciting
Solid Engineering
Understanding needs / limits
Top 1000+ WebsiteWednesday, April 22, 2009
ReplicationIgnore 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
Wednesday, April 22, 2009
Replication
Truth in advertising
Oracle does it better
MySQL does it simpler
Wednesday, April 22, 2009
Replication
Scaling Reads
Master, many slaves
Slony, Londiste, Bucardo, PGPoolII
Wednesday, April 22, 2009
Replication
Scaling Reads
Master, many slaves
Slony, Londiste, Bucardo, PGPoolII
Scaling Writes
Mostly impossible
Bucardo, PGPoolII
Wednesday, April 22, 2009
What is Federation?
A process for eliminating performance and/or scaleability as a requirement for
your database
Wednesday, April 22, 2009
Federation
MySQL software has no federation advantage
MySQL community has large federation advantage
Wednesday, April 22, 2009
Federation
Things to consider
Horizontal Partitioning
Application Based Partitioning
BASE
golconde, gearman
Wednesday, April 22, 2009
El Fin
www.xzilla.netwww.omniti.com
www.postgresql.us
Wednesday, April 22, 2009