Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Scaling my sql_in_3d

799 views

Published on

Different organizations mean different things when they talk about scaling. Sarah will offer some tips about a few different ways that this term is thrown around for MySQL databases. Each different dimension – data volume, read volume, and write volume – present different challenges to the operations and development staff working with the system.

Published in: Technology, Sports
  • Be the first to comment

  • Be the first to like this

Scaling my sql_in_3d

  1. 1. scaling MySQL in 3d sarah novotny – [email_address] open databases and LAMP services www .BlueGecko . net
  2. 2. <ul><li>large datasets </li></ul><ul><li>high volume reads </li></ul><ul><li>high volume writes </li></ul>www .BlueGecko . net http://www.flickr.com/photos/elbragon
  3. 3. <ul><li>things you’ve heard about scale </li></ul><ul><li>write 1 / read many </li></ul><ul><li>partitioning / sharding </li></ul><ul><li>multimaster / rings </li></ul><ul><li>memcached / nosql </li></ul>www .BlueGecko . net
  4. 4. <ul><li>storage choices </li></ul><ul><li>engine options </li></ul><ul><li>storage engine </li></ul><ul><li>filesystem </li></ul><ul><li>volume manager </li></ul><ul><li>hardware </li></ul>www .BlueGecko . net http://www.flickr.com/photos/shuttercat7
  5. 5. <ul><li>large datasets </li></ul><ul><li>large objects </li></ul><ul><li>many rows </li></ul>www .BlueGecko . net http://www.flickr.com/photos/olivander
  6. 6. <ul><li>storage flexibility, reliability, clone-ability </li></ul>www .BlueGecko . net http://www.flickr.com/photos/wwworks
  7. 7. www .BlueGecko . net http://www.flickr.com/photos/alreadytaken
  8. 8. <ul><li>high volume reads </li></ul><ul><li>more memory </li></ul><ul><li>fast disks </li></ul><ul><li>more memory </li></ul>www .BlueGecko . net http://www.flickr.com/photos/teclasorg
  9. 9. www .BlueGecko . net myisam vs innodb http://www.flickr.com/photos/redjar
  10. 10. 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
  11. 11. <ul><li>use thoughtful primary keys </li></ul>www .BlueGecko . net
  12. 12. <ul><li>a </li></ul><ul><li>short </li></ul><ul><li>diversion </li></ul><ul><li>to swap or </li></ul><ul><li>not to swap </li></ul><ul><li>that is the </li></ul><ul><li>question </li></ul>www .BlueGecko . net
  13. 13. www .BlueGecko . net http://www.flickr.com/photos/teclasorg
  14. 14. <ul><li>high volume writes </li></ul><ul><li>choose your filesystem well </li></ul><ul><li>understand how your filesystem and raid controller work together </li></ul><ul><li>tune them to work in concert </li></ul>www .BlueGecko . net
  15. 15. <ul><li>facebook game case: </li></ul><ul><li>highly concurrent writes </li></ul><ul><li>low risk of -- </li></ul><ul><li>omg, i lost my most recent score! </li></ul>www .BlueGecko . net
  16. 16. <ul><li>shard data </li></ul><ul><li>innodb_log_flush_at_trx_commit=0 </li></ul><ul><li>benchmark i/o schedulers </li></ul>www .BlueGecko . net
  17. 17. <ul><li>free tools </li></ul><ul><li>innotop </li></ul><ul><li>maatkit </li></ul><ul><li>MySQL proxy </li></ul><ul><li>monitoring/trending </li></ul><ul><li>cacti templates </li></ul><ul><li>$monitoring_server </li></ul><ul><li> – the one you know </li></ul>www .BlueGecko . net
  18. 18. additional resources <ul><li>irc.freenode.org </li></ul><ul><ul><li>#mysql </li></ul></ul><ul><ul><li>#maatkit </li></ul></ul><ul><li>mysql.com </li></ul><ul><li>HPM2e - Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, and Jeremy Zawodny </li></ul>www .BlueGecko . net
  19. 19. credits <ul><li>swap image </li></ul><ul><ul><li>http://www.vocw.edu.vn/content/m10106/latest/ </li></ul></ul><ul><li>special thanks to gabriel cain and mike hamrick for suggestions on content and slides </li></ul>www .BlueGecko . net
  20. 20. Blue Gecko and contact info <ul><li>[email_address] </li></ul><ul><li>[email_address] </li></ul><ul><li>@sarahnovotny </li></ul><ul><li>@bluegecko </li></ul><ul><li>senk on #mysql </li></ul>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.

×