There are many systems where Database plays central role for business operations. More often than not performance and maintainability of your “Main” database is key factor of success of your business. In order to deploy DevOps culture in your organization you need to Trust your developers and give them access to Production Database. Developers could find great insights in database metrics so you would have opportunity to improve both performance and maintainability dramatically for moderate costs.
I am going to talk about catching and solving problems in Production Databases – how to increase performance and decrease costs in long time perspective. The talk is based on experience we’ve received in Production.
2. Anton Martynenko
Dev & QA & OPS = DevOps
Head of Technical Operations at Youscan
.Net, Windows Azure, SqlServer, NoSql…
Twitter: @aamartynenko
am@youscan.biz
3. YouScanis a leader of the emerging social media monitoring & analytics market in Russia and Ukraine.
Our products:
http://youscan.ru
http://leadscanner.ru
4. The Reality:
Time is limited
Talk covers a lot of stuff
No time to go into details
If you have a question –make notes and ask later
36. Where is the problem?
Missing Index
Suboptimal Query
Low Memory (or Big Index)
Low disk IOPS (or too many queries)
Too many Indexes
37. Root cause: missing index
Missing Index
Suboptimal Query
Low Memory (or Big Index)
Low disk IOPS (or too many queries)
Too many Indexes
Review existing indexes
Add new index
Or change existing index
38. Root cause: query
Missing Index
Suboptimal Query
Low Memory (or Big Index)
Low disk IOPS (or too many queries)
Too many Indexes
Understand execution plan
Use Sqlquery parameters
Do select/update minimal field set
39. Root cause: low memory
Missing Index
Suboptimal Query
Low Memory (or Big Index)
Low disk IOPS (or too many queries)
Too many Indexes
Review fields in index
Archive old data
Check DB Engine config
Add more memory
40. Root cause: low IOPS
Missing Index
Suboptimal Query
Low Memory (or Big Index)
Low disk IOPS (or too many queries)
Too many Indexes
Use partitioning
Go to SSD
Get rid of queries
41. Root cause: too many indexes
Missing Index
Suboptimal Query
Low Memory (or Big Index)
Low disk IOPS (or too many queries)
Too many Indexes
Remove unused
Remove features
45. Table Partitioning
Jan 2014
Feb 2014
Mar 2014
Apr 2014
May 2014
June 2014
Table Orders, All Data
Partitioned table Orders,
Partition = Month
46. Database Sharding
Multiple instances,
Shard per country
Main DB
GB Main DB
DE Main DB
FR Main DB
Single instance,
All Data
47. Multitenancy
Multiple instances,
Shard per client
Main DB
Coca Cola
Main DB
BMW
Main DB
Shell
Main DB
Single instance,
All Data
Nestle
Main DB
Macdonald’s
Main DB
Siemens
Main DB
48. DB License very expensive
Coca Cola
Main DB
BMW
Main DB
Shell
Main DB
Nestle
Main DB
Macdonald’s
Main DB
Siemens
Main DB
50. Databases do a few things really well:
•They store and retrieve data
•They enforce relationships between data entities
•They provide the means to query the data for answers