Soumettre la recherche
Mettre en ligne
MySQL Scaling Presentation
•
Télécharger en tant que ODP, PDF
•
5 j'aime
•
1,624 vues
T
Tommy Falgout
Suivre
Technologie
Signaler
Partager
Signaler
Partager
1 sur 52
Télécharger maintenant
Recommandé
MySQL 5.5
MySQL 5.5
Ligaya Turmelle
MySQL 5.1 Replication
MySQL 5.1 Replication
Ligaya Turmelle
UKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL Tuning
FromDual GmbH
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTour
Wim Godden
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012
Wim Godden
Performance Schema for MySQL troubleshooting
Performance Schema for MySQL troubleshooting
Sveta Smirnova
MySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance Schema
Sveta Smirnova
Recommandé
MySQL 5.5
MySQL 5.5
Ligaya Turmelle
MySQL 5.1 Replication
MySQL 5.1 Replication
Ligaya Turmelle
UKOUG 2011: Practical MySQL Tuning
UKOUG 2011: Practical MySQL Tuning
FromDual GmbH
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTour
Wim Godden
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
Caching and tuning fun for high scalability @ FOSDEM 2012
Caching and tuning fun for high scalability @ FOSDEM 2012
Wim Godden
Performance Schema for MySQL troubleshooting
Performance Schema for MySQL troubleshooting
Sveta Smirnova
MySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance Schema
Sveta Smirnova
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
Sveta Smirnova
My sql with querys
My sql with querys
NIRMAL FELIX
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
Architecting cloud
Architecting cloud
Tahsin Hasan
Hadoop on aws amazon
Hadoop on aws amazon
Sandish Kumar H N
NetApp ontap simulator
NetApp ontap simulator
Ashwin Pawar
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
Sveta Smirnova
Backup and restore router configuration
Backup and restore router configuration
Vasilis Nikitaras
Caching and tuning fun for high scalability @ 4Developers
Caching and tuning fun for high scalability @ 4Developers
Wim Godden
How to Upgrade Your Database Plan on Heroku and Rails Setup?
How to Upgrade Your Database Plan on Heroku and Rails Setup?
Katy Slemon
Basic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAs
Sveta Smirnova
Stored procedure
Stored procedure
baabtra.com - No. 1 supplier of quality freshers
How Can I tune it When I Can't Change the Code?
How Can I tune it When I Can't Change the Code?
Sage Computing Services
Performance and Scalability
Performance and Scalability
Mediacurrent
Troubleshooting MySQL Performance
Troubleshooting MySQL Performance
Sveta Smirnova
Highload Perf Tuning
Highload Perf Tuning
HighLoad2009
Tips for a Faster Website
Tips for a Faster Website
Rayed Alrashed
Why Use EXPLAIN FORMAT=JSON?
Why Use EXPLAIN FORMAT=JSON?
Sveta Smirnova
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
I Goo Lee
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
Wim Godden
SQL Server 2008 Development for Programmers
SQL Server 2008 Development for Programmers
Adam Hutson
Contenu connexe
Tendances
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
Sveta Smirnova
My sql with querys
My sql with querys
NIRMAL FELIX
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
Architecting cloud
Architecting cloud
Tahsin Hasan
Hadoop on aws amazon
Hadoop on aws amazon
Sandish Kumar H N
NetApp ontap simulator
NetApp ontap simulator
Ashwin Pawar
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
Sveta Smirnova
Backup and restore router configuration
Backup and restore router configuration
Vasilis Nikitaras
Caching and tuning fun for high scalability @ 4Developers
Caching and tuning fun for high scalability @ 4Developers
Wim Godden
How to Upgrade Your Database Plan on Heroku and Rails Setup?
How to Upgrade Your Database Plan on Heroku and Rails Setup?
Katy Slemon
Basic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAs
Sveta Smirnova
Stored procedure
Stored procedure
baabtra.com - No. 1 supplier of quality freshers
How Can I tune it When I Can't Change the Code?
How Can I tune it When I Can't Change the Code?
Sage Computing Services
Performance and Scalability
Performance and Scalability
Mediacurrent
Troubleshooting MySQL Performance
Troubleshooting MySQL Performance
Sveta Smirnova
Highload Perf Tuning
Highload Perf Tuning
HighLoad2009
Tips for a Faster Website
Tips for a Faster Website
Rayed Alrashed
Why Use EXPLAIN FORMAT=JSON?
Why Use EXPLAIN FORMAT=JSON?
Sveta Smirnova
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
I Goo Lee
Tendances
(20)
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
My sql with querys
My sql with querys
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Architecting cloud
Architecting cloud
Hadoop on aws amazon
Hadoop on aws amazon
NetApp ontap simulator
NetApp ontap simulator
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
Backup and restore router configuration
Backup and restore router configuration
Caching and tuning fun for high scalability @ 4Developers
Caching and tuning fun for high scalability @ 4Developers
How to Upgrade Your Database Plan on Heroku and Rails Setup?
How to Upgrade Your Database Plan on Heroku and Rails Setup?
Basic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAs
Stored procedure
Stored procedure
How Can I tune it When I Can't Change the Code?
How Can I tune it When I Can't Change the Code?
Performance and Scalability
Performance and Scalability
Troubleshooting MySQL Performance
Troubleshooting MySQL Performance
Highload Perf Tuning
Highload Perf Tuning
Tips for a Faster Website
Tips for a Faster Website
Why Use EXPLAIN FORMAT=JSON?
Why Use EXPLAIN FORMAT=JSON?
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
Similaire à MySQL Scaling Presentation
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
Wim Godden
SQL Server 2008 Development for Programmers
SQL Server 2008 Development for Programmers
Adam Hutson
MySQL & Expression Engine EEUK2013
MySQL & Expression Engine EEUK2013
EEvolutionUK
My sql.ppt
My sql.ppt
MAGNA COLLEGE OF ENGINEERING
Performance Tuning
Performance Tuning
Ligaya Turmelle
Mysql
Mysql
Rathan Raj
PHP tips by a MYSQL DBA
PHP tips by a MYSQL DBA
Amit Kumar Singh
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
Robert Swisher
Advance Sql Server Store procedure Presentation
Advance Sql Server Store procedure Presentation
Amin Uddin
SQL Server Performance Tuning with DMVs
SQL Server Performance Tuning with DMVs
Franklin Yamamoto
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
Antonios Chatzipavlis
Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011
Wim Godden
MemSQL 201: Advanced Tips and Tricks Webcast
MemSQL 201: Advanced Tips and Tricks Webcast
SingleStore
15 Ways to Kill Your Mysql Application Performance
15 Ways to Kill Your Mysql Application Performance
guest9912e5
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
Mysql ppt
Mysql ppt
Sanmuga Nathan
TSQL in SQL Server 2012
TSQL in SQL Server 2012
Eduardo Castro
Optimize the obvious
Optimize the obvious
drhenner
Zend Con 2008 Slides
Zend Con 2008 Slides
mkherlakian
Getting to Know MySQL Enterprise Monitor
Getting to Know MySQL Enterprise Monitor
Mark Leith
Similaire à MySQL Scaling Presentation
(20)
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
SQL Server 2008 Development for Programmers
SQL Server 2008 Development for Programmers
MySQL & Expression Engine EEUK2013
MySQL & Expression Engine EEUK2013
My sql.ppt
My sql.ppt
Performance Tuning
Performance Tuning
Mysql
Mysql
PHP tips by a MYSQL DBA
PHP tips by a MYSQL DBA
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
Advance Sql Server Store procedure Presentation
Advance Sql Server Store procedure Presentation
SQL Server Performance Tuning with DMVs
SQL Server Performance Tuning with DMVs
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
Caching and tuning fun for high scalability @ phpBenelux 2011
Caching and tuning fun for high scalability @ phpBenelux 2011
MemSQL 201: Advanced Tips and Tricks Webcast
MemSQL 201: Advanced Tips and Tricks Webcast
15 Ways to Kill Your Mysql Application Performance
15 Ways to Kill Your Mysql Application Performance
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Mysql ppt
Mysql ppt
TSQL in SQL Server 2012
TSQL in SQL Server 2012
Optimize the obvious
Optimize the obvious
Zend Con 2008 Slides
Zend Con 2008 Slides
Getting to Know MySQL Enterprise Monitor
Getting to Know MySQL Enterprise Monitor
Dernier
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Precisely
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Dubai Multi Commodity Centre
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Slibray Presentation
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
NavinnSomaal
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
Pixlogix Infotech
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
ScyllaDB
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Enterprise Knowledge
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Databarracks
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Mattias Andersson
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
RankYa
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Manik S Magar
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Fwdays
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Fwdays
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
DianaGray10
Dernier
(20)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
MySQL Scaling Presentation
1.
Strategic MySQL Planning
for Complexity & Growth Or MySQL Scaling for Dummies Thomas Falgout Sr. Developer Yahoo!
2.
3.
Schema Definition
4.
Hardware
5.
Software
6.
MySQL Config
7.
Cache
8.
Monitoring
9.
10.
Developers usually don't
write proper SQL
11.
SQL Statements will
directly affect your performance
12.
13.
1000 very quick
unnecessary queries vs 1 slow query
14.
15.
Your coworkers might
surprise you.
16.
In a good
way.
17.
18.
Quickly show you
how much data your queries are processing
19.
Could spend an
entire session on just this.
20.
But won't.
21.
Read for yourself.
22.
http://dev.mysql.com/doc/refman/5.1/en/explain.html
23.
http://dev.mysql.com/doc/refman/5.1/en/using-explain.html
24.
http://www.percona.com/files//presentations/EXPLAIN_demystified.pdf
25.
LUUUUUCCCYYYYYYY!!!!!
26.
27.
28.
Faster on MyISAM
(stored in table info)
29.
30.
INSERT INTO a
VALUES (1,23),(2,34),(4,33);
31.
To speed up
INSERT operations that require multiple statements, LOCK your tables
32.
Can you use
LOAD DATA? (Import via CSV)
33.
34.
Not much to
say.
35.
36.
37.
DROP table
38.
RENAME tmp table
to table
39.
40.
Aggregate data hourly/daily/per
update/etc.
41.
42.
Send updates through
daemon to load data
43.
44.
UPDATE counts SET
count = count + 42 WHERE id=1
45.
46.
Does not handle
transactions
47.
Faster to Write,
Slightly faster to Read
48.
Uses separate Data
(.MYD), Index (.MYI) and Frame (.frm)
49.
50.
51.
52.
53.
Writes Binary logs
to disk
54.
Doesn't store data
55.
Useful for offloading
replication from the master
56.
Blackhole Sun.
Won't you come. Wash away my data.
57.
58.
59.
http://forge.mysql.com/wiki/Falcon
60.
61.
http://dev.mysql.com/doc/refman/5.1/en/data-size.html
62.
http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html
63.
64.
SMALLINT – 2
Bytes
65.
MEDIUMINT – 3
Bytes
66.
INT – 4
Bytes
67.
BIGINT – 8
Bytes
68.
http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html
69.
70.
VARCHAR(N) = X
+ 1 byte. X = Number of actual characters in string.
71.
N & X
= 1 Byte. Unless using utf8 or a multi-byte format
72.
Same rules apply
for BINARY & VARBINARY.
73.
Extra data is
TRUNCATED!!!!!!
74.
That's bad.
75.
http://dev.mysql.com/doc/refman/5.0/en/string-types.html
76.
77.
VARCHAR(255) is 4.x
limitation
78.
When creating a
temp table, it allocates the greatest size of data (255)
79.
80.
81.
82.
83.
TIME = 3
bytes
84.
85.
86.
192.168.101.201 = 11000000.10101000.01100101.11001001
87.
INT UNSIGNED =
4 Bytes!
88.
INET_NTOA => NumberTOAddress
89.
INET_ATON => AddressTONumber
90.
91.
92.
93.
94.
Stores first as
768 Bytes, and then increments into 16k data pages per row per TEXT/BLOB field
95.
96.
97.
Network latency affects
experience
98.
99.
Send all READS
to Slave
100.
Send all WRITES
to Master
101.
102.
Provides HA w/
no Single Point of Failure
103.
Requires 3 servers
(2 Data, 1 Mgmt Nodes)
104.
Inserts on one
DB are replicated to others
105.
Selects can be
performed on any DB
106.
http://dev.mysql.com/tech-resources/articles/mysql-cluster-for-two-servers.html
107.
http://www.lod.com/whitepapers/mysql-cluster-howto.html
108.
109.
110.
Failover
111.
Query Analysis
112.
113.
114.
Table Sync (Resolve
Differences)
115.
Visual Explain (Explain!
Visually!)
116.
Heartbeat (Shows Slave
Replication Delay)
117.
118.
119.
Point Slaves to
Master
120.
Put Slaves Behind
Load Balancer
121.
122.
Batch Insert /
Update
123.
Don't Delete
124.
Partition your Data
125.
126.
127.
table_cache
128.
innodb_buffer_pool_size
129.
130.
131.
Size of cache
for MyISAM Indexes
132.
133.
key_reads
134.
key_write_requests
135.
key_writes
136.
key_reads/key_read_requests < 0.01
== GOOD
137.
138.
This dictates the
number of open file descriptors
139.
140.
Size in bytes
of the memory buffer InnoDB uses to cache data and indexes.
141.
Default 8MB
142.
143.
Great for tables
that don't change often
144.
Doesn't return stale
data
145.
Cache is invalidated
if returned entry is modified
146.
Another reason why
SELECT(*) is bad
147.
148.
MyISAM – Leave
more memory for OS page caches
149.
150.
Use long_query_time to
specify x
151.
~1 sec is
good starting point
152.
http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html
153.
154.
Originally created by
LiveJournal to handle scale
155.
EASY Button
156.
$memcache_obj = memcache_connect("localhost",
11211);
157.
$memcache_obj->add('var_key', 'test variable');
158.
$var = $memcache_obj->get('var_key');
159.
160.
161.
mysqlslap -u root
-concurrency=10000 -iterations=5 -number-of-queries=10000 -query=”SELECT name FROM city WHERE city_id=12”
162.
163.
Like mysqlslap
164.
165.
166.
167.
SHOW GLOBAL STATUS
168.
SHOW GLOBAL VARIABLES
169.
170.
MUNIN – Similar
to Cacti, but easier to maintain
171.
Nagios – More
of a notification tool
172.
MySQL Enterprise Dashboard
– Notification & Monitoring
173.
174.
Be descriptive
175.
Avoid reserve words
(date, time, timestamp)
176.
177.
178.
Break your software.
179.
180.
The Most Important
Lesson This part is absolutely important that you get. It's time to wake up.
181.
The Most Important
Lesson When you need to, Ignore everything I've suggested.
182.
Thanks Thanks for
listening.
183.
Links Flickr -
Scaling MySQL http://www.scribd.com/doc/21593/Scaling-PHPMySQL Very Basic PHP & MySQL: http://www.cs.gsu.edu/~stefan/teaching/csc-6370/notes/phpmysql.pdf JPIPES! http://jpipes.com/presentations/joinfu/joinfu_part_one.pdf http://jpipes.com/presentations/joinfu/joinfu_part_two.pdf http://jpipes.com/presentations/dqm/legend_drunken_query_master.pdf EXPLAIN: http://www.percona.com/files//presentations/EXPLAIN_demystified.pdf Query Optimization: http://www.percona.com/files//presentations/Zurich2007-QueryOptimization.pdf Server Settings Tuning: http://www.percona.com/files//presentations/UC2007-MySQL-Server-Settings-Tuning.pdf http://www.flupps.org/mysql/MySQL_Microscope.ppt http://dev.mysql.com/doc/refman/5.0/en/working-with-null.html http://www.devshed.com/c/a/MySQL/MySQL-Server-Tuning-Tips-and-Tricks/ http://www.planetmysql.org/
Télécharger maintenant