Dance with MySQL<br />Manage MySQL with Open source<br />周振兴@TaobaoDBA<br />http://orczhou.com<br />2010-06<br />1<br />
What MySQL do for us<br />System A<br />950Gdata<br />650G index<br />Total1.6T<br />IOPS 18947<br />Delta3.2G<br />8000*1...
What MySQL do for us<br />System B<br />15,0000,0000  records<br />Total:4T<br />Delta<br />1000,0000<br />16 *<br />Uptim...
What about my topic<br />How to manage 200+ MySQL Instance<br />
What we do<br />             Test<br />                      routine Install<br />           Find Problem/debug<br />     ...
Why<br />Why we think about this a lot?<br />We have  200+  MySQLInstance<br />Test 	is about 	Money<br />Install 	is abou...
Why Test<br />Simple math<br />Performance increase 10%<br />200*2W *10% = 40W<br />200*2W *20% = 80W<br />What can 80W do...
Why Test<br />Performance<br />Stable<br />Last year  >85% accidentcan be avoided<br />This year  < 5%<br />
How Test<br />Sysbench<br />How to use sysbench<br />How many row<br />Read write rate<br />
How Test<br />Why sysbench?<br />Why not sysbench?<br />Why supersmack?<br />Data set > 120G <br />95% query for 5%data<br...
How Test<br />Supersmack<br />
How Test<br />Supersmack<br />Dell PowerEdge 2950 <br />Mem:24G  6*300 SAS RAID10<br />We test different PC Server/Hardwar...
What Test<br />Decide which value we choose<br />InnoDB_IO_CAPACITY<br />One hour average in blue<br />Tow hour average in...
Install<br />TestMoney 	Sysbench/supersmack<br />InstallTime		<br />Debug Stability 	<br />BackupSafety<br />>mysql_instal...
Debug<br />It’s a real complicated work<br /><ul><li>One point:  tcpdump +mk-query-digest
It’s a talent work</li></li></ul><li>Debug<br />tcpdump + mk-query-digest<br />
Backup<br />mysqldump is cool<br />39G .sql  takes 80 min<br />Restore takes 206 min(3.4)<br />Still we need Xtrabackup<br...
Xtrabackup<br />Using InnoDB Redo (Transaction log)<br />No effect to the Online system<br />Also help u to setup a new sl...
More backup strategy<br />Last 4 Day  Last 3 month Last 3 Year<br />1 3 5 mysqldump   2 4 6  xtrabackup<br />
MySQL Monitor<br />Quick way: Cacit + RRDTool<br />Screenshot<br />
What we monitor<br />Com_select <br />Com_insert <br />Com_update <br />Com_delete<br />Principle: <br />The bigger the sy...
Logical read/write
Physical read/write
Upcoming SlideShare
Loading in...5
×

Manage MySQL with open source

2,456

Published on

Manage MySQL with Open source By orczhou.com

Published in: Technology
0 Comments
10 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,456
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
172
Comments
0
Likes
10
Embeds 0
No embeds

No notes for slide

Manage MySQL with open source

  1. 1. Dance with MySQL<br />Manage MySQL with Open source<br />周振兴@TaobaoDBA<br />http://orczhou.com<br />2010-06<br />1<br />
  2. 2. What MySQL do for us<br />System A<br />950Gdata<br />650G index<br />Total1.6T<br />IOPS 18947<br />Delta3.2G<br />8000*1024 = 800W<br />
  3. 3. What MySQL do for us<br />System B<br />15,0000,0000 records<br />Total:4T<br />Delta<br />1000,0000<br />16 *<br />Uptime:217 days 18 hours 34 min 2 sec<br />
  4. 4. What about my topic<br />How to manage 200+ MySQL Instance<br />
  5. 5. What we do<br /> Test<br /> routine Install<br /> Find Problem/debug<br /> Backup<br /> Monitor<br />
  6. 6. Why<br />Why we think about this a lot?<br />We have 200+ MySQLInstance<br />Test is about Money<br />Install is about Time<br />Debug is about Stability <br />Backup is about Safety<br />Monitor is about Status<br />Which one you can drop?<br />
  7. 7. Why Test<br />Simple math<br />Performance increase 10%<br />200*2W *10% = 40W<br />200*2W *20% = 80W<br />What can 80W do ?<br />
  8. 8. Why Test<br />Performance<br />Stable<br />Last year >85% accidentcan be avoided<br />This year < 5%<br />
  9. 9. How Test<br />Sysbench<br />How to use sysbench<br />How many row<br />Read write rate<br />
  10. 10. How Test<br />Why sysbench?<br />Why not sysbench?<br />Why supersmack?<br />Data set > 120G <br />95% query for 5%data<br />80% query for 20% data<br />
  11. 11. How Test<br />Supersmack<br />
  12. 12. How Test<br />Supersmack<br />Dell PowerEdge 2950 <br />Mem:24G  6*300 SAS RAID10<br />We test different PC Server/Hardware<br />
  13. 13. What Test<br />Decide which value we choose<br />InnoDB_IO_CAPACITY<br />One hour average in blue<br />Tow hour average in red<br />
  14. 14. Install<br />TestMoney Sysbench/supersmack<br />InstallTime <br />Debug Stability <br />BackupSafety<br />>mysql_install_auto -h 172.23.119.257 -v 5.1.45<br />File descriptor<br />Swappiness<br />.......<br />
  15. 15. Debug<br />It’s a real complicated work<br /><ul><li>One point: tcpdump +mk-query-digest
  16. 16. It’s a talent work</li></li></ul><li>Debug<br />tcpdump + mk-query-digest<br />
  17. 17. Backup<br />mysqldump is cool<br />39G .sql takes 80 min<br />Restore takes 206 min(3.4)<br />Still we need Xtrabackup<br />On line<br />No lock<br />Some environment <br />it’s quick && restore is quick<br />
  18. 18. Xtrabackup<br />Using InnoDB Redo (Transaction log)<br />No effect to the Online system<br />Also help u to setup a new slave<br />System can be more Available<br />
  19. 19. More backup strategy<br />Last 4 Day Last 3 month Last 3 Year<br />1 3 5 mysqldump 2 4 6 xtrabackup<br />
  20. 20. MySQL Monitor<br />Quick way: Cacit + RRDTool<br />Screenshot<br />
  21. 21. What we monitor<br />Com_select <br />Com_insert <br />Com_update <br />Com_delete<br />Principle: <br />The bigger the system is, <br />the more simple the basic layer is<br /><ul><li>InnoDB
  22. 22. Logical read/write
  23. 23. Physical read/write
  24. 24. Row operation</li></li></ul><li>Finally<br />TestMoney Sysbench/supersmack<br />InstallTime Linux/bash<br />Debug Stability mk-query-digest / iostat / ...<br />BackupSafety Xtrabackup<br />MonitorStatus Cacti/RRDTool<br />Enjoy....<br />
  25. 25. What I know is so limited<br />Still I like Sharing<br />Q & A<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×