innodb usage and diagnostics
-
Upload
sarahnovotny -
Category
Technology
-
view
1.146 -
download
1
description
Transcript of innodb usage and diagnostics
①innodb architecture②indexing curiosities③scaling issues④ops concerns⑤3p tools
www.BlueGecko.net
www.BlueGecko.net
① InnoDB Architecture
MVCCrow level lockingtransactionsforeign keystablespacesundo logsredo logs
www.BlueGecko.net
the special sauce!
clustered indexingnatural orderpage directory
two short operational diversions
innodb_flush_method = O_DIRECTis worth benchmarking on your system.
choose smart primary keys
www.BlueGecko.net
www.BlueGecko.net
② indexing curiosities
secondary indexes point to the clustered index
BLOB, VARCHAR, TEXT can be stored in overflow pages
ERROR HY000: Too big row.
③scaling issues
when it’s time togo big, where arethe bottlenecks?
www.BlueGecko.net
innodb locking
auto- incrementgap locking
www.BlueGecko.net
a view of locking in innotop
www.BlueGecko.net
concurrency
google: domas concurrency and click “I feel lucky!”
http://bit.ly/domas_inno_concurrency
www.BlueGecko.net
InnoDB thread concurrency
www.BlueGecko.net
balance between i/o capabilities and mutex contention
innodb_thread_concurrency
multi cores, faster disk work to be done
www.BlueGecko.net
④operational concerns
www.BlueGecko.net
④ operational concerns
mysql> show innodb status;
this gives you snapshot information
trending gives you framework to see when things are going wrong
http://code.google.com/p/mysql-cacti-templates
www.BlueGecko.net
indirect measures to see what is happening
www.BlueGecko.net
④ operational concerns
the combination of historical data with current status from the host is invaluable in determining cause
www.BlueGecko.net
④ operational concerns
www.BlueGecko.net
⑥free tools
InnotopMySQL proxy/ tcpdumpmysql-cacti-templatesgdb (poormansprofiler.org)
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
• hk architecture – davelau• special sauce – fotoosvanrobin• yellow pages - f-r-a-n-k• Bell Labs - sodapop81• lock - darwinbell
• License plate - severud• voodoo - heungsub• clones - adactio• tools – meanestindian• console - hermzz
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.