16. www.percona.com16
Consider things
• But avoid focus on extreme
outliers
Look beyond
averages
• Daily and Weekly cycle
• Growth of load and Data Size
Make sure to
look at trends
over time
• Data size changes?
Think about the
Future
18. www.percona.com18
Schema Tips
Learn indexing
• http://bit.ly/1rAtamE
Design Schema for Data access
• Rethink your schema
Technical voodoo
• Partitioning and Sharding
• Normalization and denormalization
19. www.percona.com19
The following also Matters
Infrastructure
• Storage systems, virtualization, etc.
Operating system and configuration
• Disk scheduler, FS, etc…
MySQL Version
• Are you using Percona Server, MariaDB, MySQL?
MySQL configuration
• The default configuration of Hell…
25. www.percona.com25
MySQL Version
New versions typically improve performance
Scalability, improved optimizer
Expect some regression
Try maybe a different flavor? Percona Server 5.6
31. www.percona.com31
What is Percona Toolkit?
• Collection of command-line tools for a wide range of MySQL
DBA tasks
• Works with MySQL 5.0+, MariaDB, Percona Server, Percona
XtraDB Cluster
• Professionally developed, supported, and maintained by
Percona
• 7 years maturity, thousands of tests, 20 testing environments, 1
full-time developer
• Free, open-source www.percona.com/software/percona-toolkit
2
32. www.percona.com32
Installation
• Rpm and deb packages are available
http://www.percona.com/downloads/percona-toolkit /LATEST/
• Or you can use a tarball
wget percona.com/get/percona-toolkit.tgz
• Extract, then make, make install
Or, if you only need a specific tool
wget percona.com/get/TOOL
2
38. www.percona.com38
Where to Analyze ?
• Development to catch
bad queries early
• Production to catch
good queries starting
to go bad
Both !
39. www.percona.com39
Query Performance can show
modifying parameters
Workload Changes
Data Size
Changing Query Plans
Upgrading MySQL Version
Changing MySQL Settings
Hardware Changes
40. www.percona.com40
But Why Slow ?
• MySQL Level
• OS Level
• Hardware/
Environment Level
Need to
know more
than query
level
information
41. www.percona.com41
Hardware visibility
Eeek!
I have a
new
machine
What are the specs?
What is the current memory usage?
How is the storage system currently set up?
What are the OS specifics that are currently
applied?
51. www.percona.com51
Pt-stalk
• You are having performance problems, however it’s difficult to pinpoint
what is causing it.
• Analyse Data
• Fix what is wrong
• Problems can occur randomly
• Problems can happen while you are not monitoring
• pt-stalk is a tool which gives you the ability to monitor variables while
you are not keeping an eye on them
54. www.percona.com54
Innotop
• Sometimes it’s hard to keep track of the
active queries on your system.
• Amount of queries are confusing
• Which query should I explain
• Which query is problematic?
• Why, how, where, what?