5 things you need to know about MySQL (if you don’t have a DBA) sarah novotny –  [email_address] MySQL and LAMP services www .BlueGecko . net
changing ecosystem versions storage engines and locking backups scaling free tools www .BlueGecko . net
changing ecosystem MySQL -> Sun -> Oracle Monty Program AB OpenDB Alliance www .BlueGecko . net
www .BlueGecko . net
versions 5.0 – stable.  (do i need to say more?) 5.1 – fresh feature set   –  many open bugs   –  partitioning   –  row base replication   –  mysqlslap 5.4 – 5.1 ++ google patches  –  scalability improvements -> multicore  –  enhanced monitoring / diagnostic  –  sane defaults for my.cnf out of the box  www .BlueGecko . net
www .BlueGecko . net
a short diversion from High Performance  MySQL 2 nd  Edition  (HPM2e) -Baron Schwartz, Peter Zaitsev,  Vadim Tkachenko, and Jeremy  Zawodny (don’t mistake 1 st  Edition for 2 nd.   1 st  is dangerously out of date  unless you’re running version 4.0) www .BlueGecko . net
storage engines innodb myisam merge blackhole archive federated www .BlueGecko . net
and locking innodb myisam www .BlueGecko . net
and locking www .BlueGecko . net
backups take them and test a restore www .BlueGecko . net
backups mysqldump is not always a valid backup replication is easiest  (and it gets you a warm standby) InnoDB hot backup XtraBackup mylvmbackup www .BlueGecko . net
backups www .BlueGecko . net
scale when it’s time to go big, what are the options? separate reads  from writes www .BlueGecko . net
scale write 1 / read many partitioning / sharding multimaster / rings memcached  wafflegrid www .BlueGecko . net
another short diversion to swap or not  to swap that is the  question www .BlueGecko . net
free tools Innotop maatkit MySQL proxy monitoring/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 flickr Make: biosphere  - kevino MySQL mints - jimwinstead 5 – losmininos storage- shuttercat7 clones - adactio Bell Labs - sodapop81 License plate - severud tools – meanestindian console - hermzz other swap image http://www.vocw.edu.vn/content/m10106/latest/ special thanks to mike hamrick for suggestions on content and slides www .BlueGecko . net
Blue Gecko and contact info [email_address] [email_address] @sarahnovotny @bluegeckodba 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.

5 things MySql

  • 1.
    5 things youneed to know about MySQL (if you don’t have a DBA) sarah novotny – [email_address] MySQL and LAMP services www .BlueGecko . net
  • 2.
    changing ecosystem versionsstorage engines and locking backups scaling free tools www .BlueGecko . net
  • 3.
    changing ecosystem MySQL-> Sun -> Oracle Monty Program AB OpenDB Alliance www .BlueGecko . net
  • 4.
  • 5.
    versions 5.0 –stable. (do i need to say more?) 5.1 – fresh feature set – many open bugs – partitioning – row base replication – mysqlslap 5.4 – 5.1 ++ google patches – scalability improvements -> multicore – enhanced monitoring / diagnostic – sane defaults for my.cnf out of the box www .BlueGecko . net
  • 6.
  • 7.
    a short diversionfrom High Performance MySQL 2 nd Edition (HPM2e) -Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, and Jeremy Zawodny (don’t mistake 1 st Edition for 2 nd. 1 st is dangerously out of date unless you’re running version 4.0) www .BlueGecko . net
  • 8.
    storage engines innodbmyisam merge blackhole archive federated www .BlueGecko . net
  • 9.
    and locking innodbmyisam www .BlueGecko . net
  • 10.
    and locking www.BlueGecko . net
  • 11.
    backups take themand test a restore www .BlueGecko . net
  • 12.
    backups mysqldump isnot always a valid backup replication is easiest (and it gets you a warm standby) InnoDB hot backup XtraBackup mylvmbackup www .BlueGecko . net
  • 13.
  • 14.
    scale when it’stime to go big, what are the options? separate reads from writes www .BlueGecko . net
  • 15.
    scale write 1/ read many partitioning / sharding multimaster / rings memcached wafflegrid www .BlueGecko . net
  • 16.
    another short diversionto swap or not to swap that is the question www .BlueGecko . net
  • 17.
    free tools Innotopmaatkit MySQL proxy monitoring/trending cacti templates $monitoring_server – the one you know www .BlueGecko . net
  • 18.
    additional resources irc.freenode.org#mysql #maatkit mysql.com HPM2e - Baron Schwartz, Peter Zaitsev, Vadim Tkachenko, and Jeremy Zawodny www .BlueGecko . net
  • 19.
    credits flickr Make:biosphere - kevino MySQL mints - jimwinstead 5 – losmininos storage- shuttercat7 clones - adactio Bell Labs - sodapop81 License plate - severud tools – meanestindian console - hermzz other swap image http://www.vocw.edu.vn/content/m10106/latest/ special thanks to mike hamrick for suggestions on content and slides www .BlueGecko . net
  • 20.
    Blue Gecko andcontact info [email_address] [email_address] @sarahnovotny @bluegeckodba 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.

Editor's Notes

  • #4 Not locked into proprietary space… many options. Based from the same code tree Lib mysql vs lib drizzle – licensing gotcha libmysql gpl libdrizz bsd drizzle Maria Our delta Google patches Percona xtradb
  • #6 Google patches include a better malloc And completely changed locking
  • #7 Choose 5.1 or 5.4 only if you need the featuresets.
  • #9 •❑ inno - row with exception •❑ myi - table -- fast in some cases and search cases ( fast inserts? without lock )•❑federated - replication not multiple master. •❑ blackhole handy for logging without inserting into db or skipping a db for fake muliple master
  • #10 Much performance pain come into play with lock contention
  • #11 Much performance pain come into play with lock contention Names changed to protect the innocent
  • #12 Understand MTR and see if you meet that goal. tarball /dump / cpio not a valid backup
  • #13 •❑ tarball /dump / cpio not a valid backup •❑ replication•❑innohot•❑lvm backup script... lvmbackup? •❑ mysqldump = 100% inno ok. single transaction .•❑xtrabackup -- free innohot
  • #14 LVM and slaves give easy opportunities for creating clones for testing
  • #15 Begin with having your application understand that reads and writes are different
  • #16 API SHOULD KNOW THE DIFF proxy as an option if API not possible. scale writes. write own interfaces? check on it. btree index larger than memory -- writes get _slow_ Memcached – good for short lived data and caching wafflegrid -- patches to mysql -- innodb bufferpool over memcached
  • #17 If you’re worried about swapping, use huge page support for mysql (linux doesn’t swap out huge pages
  • #18 •❑ disk•❑memory•❑up/down•❑cachehit -- baseline defiinition•❑replication •❑ mktablesync•❑mkchecksum