scaling mysql in 3d sarah novotny – [email protected] [email protected] open databases and...
TRANSCRIPT
things you’ve heard about scale
write 1 / read manypartitioning / shardingmultimaster / ringsmemcached / nosql
www.BlueGecko.net
①large datasets②high volume reads③high volume writes
www.BlueGecko.net
http://www.flickr.com/photos/elbragon
storage choices
engine optionsstorage enginefilesystemvolume managerhardware
www.BlueGecko.net
http://www.flickr.com/photos/shuttercat7
①large datasets
large objectsmany rows
www.BlueGecko.net
http://www.flickr.com/photos/olivander
storage flexibility, reliability, clone-ability
www.BlueGecko.net
http://www.flickr.com/photos/wwworks
www.BlueGecko.net
http://www.flickr.com/photos/alreadytaken
②high volume reads
more memoryfast disksmore memory
www.BlueGecko.net
http://www.flickr.com/photos/teclasorg
www.BlueGecko.net
myisam vs innodb
http://www.flickr.com/photos/redjar
www.BlueGecko.net
not to be obvious, but -- read less data!
compress data (if you can)
don’t use limit
http://www.flickr.com/photos/rogersmith
use thoughtful primary keys
www.BlueGecko.net
ashortdiversion
to swap ornot to swap that is the question
www.BlueGecko.net
www.BlueGecko.net
http://www.flickr.com/photos/teclasorg
③high volume writes
choose your filesystem wellunderstand how your filesystem and raid controller work togethertune them to work in concert
www.BlueGecko.net
facebook game case:
highly concurrent writeslow risk of --omg, i lost my most recent score!
www.BlueGecko.net
shard datainnodb_log_flush_at_trx_commit=0benchmark i/o schedulers
www.BlueGecko.net
free tools
innotopmaatkitMySQL proxymonitoring/trending
cacti templates$monitoring_server – the one you know
www.BlueGecko.net
additional resources
• irc.freenode.org– #mysql– #maatkit
• mysql.com• HPM2e -Baron Schwartz,
Peter Zaitsev, Vadim Tkachenko, and Jeremy Zawodny
www.BlueGecko.net
credits• swap image
– http://www.vocw.edu.vn/content/m10106/latest/
• special thanks to gabriel cain and mike hamrick for suggestions on content and slides
www.BlueGecko.net
Blue Gecko and contact info
• [email protected]• [email protected]• @sarahnovotny• @bluegecko• senk on #mysql
www.BlueGecko.net
Blue Gecko provides Remote DBA services for companies around the world
7x24x365 support including monitoring, performance analysis, proactive maintenance and architectural guidance for small and large datasets.