Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
mysql-freeze
Search
ichirin2501
March 10, 2018
Programming
0
340
mysql-freeze
ichirin2501
March 10, 2018
Tweet
Share
More Decks by ichirin2501
See All by ichirin2501
MySQL運用とらぶるすとーり〜^2 / MySQL-Troubleshooting-Story
ichirin2501
7
12k
計算量と僕とWeb開発 / computational complexity and I and Web
ichirin2501
14
10k
Other Decks in Programming
See All in Programming
subpath importsで始めるモック生活
10tera
0
300
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
160
ヤプリ新卒SREの オンボーディング
masaki12
0
130
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
Click-free releases & the making of a CLI app
oheyadam
2
110
Jakarta EE meets AI
ivargrimstad
0
600
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
Realtime API 入門
riofujimon
0
150
CSC509 Lecture 11
javiergs
PRO
0
180
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Featured
See All Featured
A better future with KSS
kneath
238
17k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Gamification - CAS2011
davidbonilla
80
5k
What's new in Ruby 2.0
geeforr
343
31k
For a Future-Friendly Web
brad_frost
175
9.4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
89
Mobile First: as difficult as doing things right
swwweet
222
8.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Designing Experiences People Love
moore
138
23k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Transcript
MySQL freeze ͷר גࣜձࣾͯͳ id: ichirin2501 2017-08-19 Kyoto.ͳΜ͔ #3
ࣗݾհ • ݩߊ ( @ichirin2501 ) • ͯͳͷWebΦϖϨʔγϣϯΤϯδχΞ ڵຯ
ࠓճͷ͓
MySQLͷfreeze!!
࣌ʹ֬ೝग़དྷͨൣғΛྻڍ • ٸʹࢮ͵ • ࢮʹํfreeze, MySQLͷϓϩηεੜ͖ͯΔ • mysqladmin pingͳͲͷԠग़དྷΔ •
Ұ෦σʔλϕʔεͷΫΤϦ͕ฦͬͯ͜ͳ͍ • TCPͷଓཱ֬ग़དྷΔ, TCP keepaliveಈ͍ͯΔ • ΤϥʔϩάʹԿใग़ྗ͞Ε͍ͯͳ͍
͏͚Δ
͏͚ͳ͍
MySQLͷόʔδϣϯͱ͔ • MySQL-5.5.46 • mysql-server-5.5_5.5.46-0+deb7u1_amd64.deb • mysql-server-5.5_5.5.46-0+deb8u1_amd64.deb • OS: Debian
7.10(wheezy) or 8.1(jessie) • Kernel: wheezy=3.10.23, jessie=3.16.0
ڧҾʹ࠶ݱͤ͞Δ
sysbench !! (ҙ:benchmarkπʔϧ)
ߴෛՙΛ͔͚ଓ͚ͨΒ࠶ݱ͠ ͨʂʂ
sysbenchʹΑΔࡶͳݕূ݁Ռ EFCJBO EFCJBO P P Y Y
Y P P P P P x͕freeze
ϚΠφʔόʔδϣϯΛ্͛Δ 5.5.46 -> 5.5.52
ຊ൪ͰFreeze͠ͳ͘ͳͬͨ
ԿΘ͔ΒΜ͕ฏ͕๚Εͨ
࣌ա͗...
։ൃऀɿʮscript࣮ߦͯͨ͠Βfreezeͨ͠ʯ ࢲɿʮ͋ʔ͋ʔɺͳʹฉ͑͜·ͤΜʯ
MySQL-5.6.27͕Freeze
࠶ݕূ1 • աڈͷ؆қͳݕূͰfreeze͠ͳ͔ͬͨ • ಉݕূΛ࠶ߦ͕ͬͨ࠶ݱग़དྷͳ͍ • : sysbenchετϨεςετͰͳ͍
࠶ݕূ2 • ࣮ࡍʹϑϦʔζͨ͠batchεΫϦϓτͰࢼ͢ • 1ճ25࣌ؒͷbatchεΫϦϓτ • ݕূճ͕ॏͶΒΕͳ͍͕ࢼͦ͏ʂ
1ճͰݟࣄʹfreeze ͬͨͶʂʂʂʂʂ
ௐࠪ • Ҏલௐࠪͨ͠ͱ͖ʹεϧʔ͍߲͕ͯͨ͠ؾ ʹͳͬͨ • mysql-5.5.49ͷBugs FixedͷҰ෦ • InnoDB: Running
REPLACE operations on multiple connections resulted in a hang. (Bug #22530768, Bug #79185)
bug report • ʮInnodb freeze running REPLACE statementsʯhttps://bugs.mysql.com/ bug.php?id=79185 •
ಈ࡞ڥͱݱ͕ࠅࣅ͍ͯͨ͠ɻ ͰɺREPLACEΫΤϦࠓճͷfreezeࣄ݅ʹ ͓͍ͯҰൃߦ͞Ε͍ͯͳ͍
ؾʹͳͬͯίʔυΛݟʹߦ͘ • https://github.com/mysql/mysql-server/ search?q=22530768&type=Commits&utf8= %E2%9C%93 • |'o') TASपΓͷमਖ਼͡ΌΜ....REPLACEΫΤϦ ʹݶΒͳ͍ͷͰ....ෆԺ
ϚΠφʔόʔδϣϯΛ্͛Δ • 5.6.27ʹઌ΄ͲͷBugfixؚ·Ε͍ͯͳ ͍ɻͱΓ͋͑ͣ5.6.37·Ͱ্͛ͯscriptΛ࣮ߦ • ಉ༷ͷscriptΛԿ͔࣮ߦ͕ͨ͠freezeͳ͠ ࠓฏʂʂʂ
Α͘Θ͔ΒΜ͕ղܾʂʂ
ฏ͕Ұ൪
·ͱΊ • ϛυϧΣΞͷݕূेʹߦ͍·͠ΐ͏ • ͪΌΜͱετϨεςετΛ࣮ࢪ͠·͠ΐ͏ • ؾʹͳͬͨBugमਖ਼ͷίϛοτΛݟʹߦ͜͏