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
ISUCONってなんだ / What is ISUCON
Search
muttan
August 18, 2018
Technology
0
310
ISUCONってなんだ / What is ISUCON
ふくもく会 その43 / Kanazawa.rb meetup #72 のLT大会で使用した資料です
muttan
August 18, 2018
Tweet
Share
More Decks by muttan
See All by muttan
さわやか待ち時間LINE botを作った話 / Sawayaka LINE bot
bath_poo_
0
100
コンテナ開発入門 1回目/Introduction to Container Development 1
bath_poo_
0
130
Web技術の基本 8回目 / Introduction to Web technologies 8th class
bath_poo_
0
160
Web技術の基本 7回目 / Introduction to Web technologies 7th class
bath_poo_
0
140
Web技術の基本 6回目 / Introduction to Web technologies 6th class
bath_poo_
1
230
Web技術の基本 5回目 / Introduction to Web technologies 5th class
bath_poo_
0
110
Web技術の基本 4回目 / Introduction to Web technologies 4th class
bath_poo_
0
190
Web技術の基本 3回目 / Introduction to Web technologies 3rd class
bath_poo_
0
230
Web技術の基本 2回目 / Introduction to Web technologies 2nd class
bath_poo_
0
240
Other Decks in Technology
See All in Technology
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
1
220
Storybook との上手な向き合い方を考える
re_taro
5
1.8k
Next.jsとNuxtが混在? iframeでなんとかする!
ypresto
2
530
The Role of Developer Relations in AI Product Success.
giftojabu1
0
150
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
4
900
OS 標準のデザインシステムを超えて - より柔軟な Flutter テーマ管理 | FlutterKaigi 2024
ronnnnn
1
310
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
180
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.8k
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
720
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
790
TypeScript、上達の瞬間
sadnessojisan
48
14k
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
A Tale of Four Properties
chriscoyier
156
23k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Code Reviewing Like a Champion
maltzj
520
39k
How to Ace a Technical Interview
jacobian
276
23k
Typedesign – Prime Four
hannesfritz
40
2.4k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Transcript
࠷ۙISUCONָ͕͍͠ Kanazawa.rb meetup #72 / ;͘͘ձ ͦͷ43 2018-8-18(Sat) @AOSSA 6֊
ݚमࣨ ਆ୩ܓ྄(@bath_poo_)
ࣗݾհ ISUCONͱ ରࡦ
ISUCON
ISUCON??
Iikanjino SUshiwotaberu CONtest ͍͍ײ͡ͷण࢘Λ৯Δίϯςετ
Iiikanjino SUnisuwaru CONtest ͍͍ײ͡ͷҜࢠʹ࠲Δίϯςετ ͜Ε͋ͳ͕ͪؒҧͬͯͳ͍ͷͰ…
ISUCONͱ • Iikanjini Speed Up CONtestͷུ ‣ ͭ·Γ(?)͍͍ײ͡ʹεϐʔυΞοϓ͢Δνϡʔχϯάίϯςετ ‣ ϨΪϡϨʔγϣϯͷൣғͰ͋ΕԿͰΓ์ͷָ͍͠ίϯ
ςετ ‣ ࠷ۙେֶͷਓୡͱΘ͍Θ͍ͬͯΔ ‣ ҰΔͷͰͭΒ͍(ମతʹ)ͭΒ͍
༏উ͕ۚ100ສԁͰ͢
ISUCONͱ • (ISUCON7ʹ͓͍ͯ)ҎԼͷͷΛมߋ͠ͳ͚ΕԿΛ ͍͍ͯ͠ࣄʹͳ͍ͬͯΔ ɾΞΫηεઌͷ63*ɺͨͩ͠αʔόʔଆͰੜ͢Δ෦ʢ*%ͳͲʣจࣈछ ʢ<><B[";@>ͳͲʣΛม͑ͳ͍ൣғͰࣗ༝ʹੜͯ͠ྑ͍ ɾϨεϙϯε )5.- ͷ%0.ߏʢදࣔʹӨڹ͠ͳ͍ൣғͰͷۭനจࣈͷ૿ ݮڐՄ͞ΕΔ
ɾ+BWB4DSJQU$44ϑΝΠϧͷ༰ ɾը૾͓ΑͼಈըͷϝσΟΞϑΝΠϧͷ༰ Ҿ༻ɿhttp://isucon.net/archives/50927022.html • զʑʹԿ͕Ͱ͖Δͷ͔… Ҝࢠʹ࠲Δ͜ͱ
ISUCONͱ • ༻͍ͯ͠ΔιϑτΣΞͷೖସ͑ • ίϯϑΟάϑΝΠϧΛ͍͡Δ(nginx.conf, my.cnfͱ͔) • ΞϓϦέʔγϣϯίʔυͷ࠷దԽ • ςϯϓϨʔτΛ͍͡Δ
• ෳαʔόͷߏมߋ • DBεΩʔϚͷมߋ • ༻ҙ͞Εͯͳ͍ଟݴޠͰॻ͖͑Δ(!!)
ͨͱ͑ISUCON7 • ༧બ͔Βෳߏʢ̏ʣ • ग़ऀ͕ΞϯνGoͳͷͰ, Go͔Γ༗རʹͳΔΑ͏ͳආ͚ΒΕ͍ͯͨ • ͲͷαʔόCPU͕1ίΞͩͬͨ • ϝϞϦ1GB͔͠ͷ͍ͬͯͳ͍
• DBʹը૾͕όΠφϦͰอଘ͞Ε͍ͯΔʂʂ ISUCON7(༧બ)Λ࣮ࡍʹݟͯΈΔ?
ͨͱ͑ISUCON7 "QQ "QQ proxy /icons proxy /icons proxy / proxy
/ ϕϯνϚʔΧʔʢӡӦʣ ޙ࿅शͨ͠ͱ͖ͷߏ ͜͜ʹը૾Λ ॻ͖ग़͓ͯ͘͠
ࣗݾհ ISUCONͱ ରࡦ
ରࡦʢաڈʣ • ͳΜͱաڈ͕ఏڙ͞Ε͍ͯΔ(VagrantͰ͍͑ͬ) https://github.com/matsuu/vagrant-isucon
ରࡦʢաڈʣ • اۀISUCONఏڙ͞Ε͍ͯΔࣄ͕ଟ͍ • Yahooגࣜձࣾ https://github.com/yahoojapan/yisucon • ϐΫγϒגࣜձࣾ https://github.com/catatsuy/private-isu ‣
AMIެ։͞Ε͍ͯΔͷͰ͙͢Ͱ͖ͦ͏ • ଞʹ͋ͬͨΒڭ͍͑ͯͩ͘͞
ରࡦʢܭଌʣ • ܭଌͷํΛ֮͑Α͏ Don’t guess! Measure! • ܭଌ͢͠ɻܭଌ͢Δ·ͰͷͨΊͷௐΛͯ͠ͳΒ ͳ͍ɻίʔυͷҰ෦͕ΓΛѹ͠ͳ͍ͷͰ͋Εɺͳ͓͞ ΒͰ͋Δɻ(Ҿ༻ɿhttps://ja.wikipedia.org/wiki/UNIXֶ)
ରࡦʢܭଌʣ • ࣮ࡍʹܭଌΛ͢Δ ‣ nginxͷΞΫηεϩάͷղੳΛ͢Δ - kataribe(matsuu/kataribe) - alp(kuchiki/alp) ‣
ϕϯνϚʔΫճ͠ͳ͕ΒෛՙΛݟΔ - htop ‣ εϩʔΫΤϦΛग़͢ - perconaͱ͔mysqldumpslowͱ͔
ରࡦʢܭଌʣ • ͨͱ͑kataribe • /tagsͷฏۉ͕͔ͳΓ͍ • /ͷΞΫηεେม͓͍ͦ
ରࡦʢηοτΞοϓʣ • ηοτΞοϓΛεϜʔζʹͰ͖ΔΑ͏ʹ ‣ sshͷઃఆ ‣ ֤छΠϯετʔϧΛεϜʔζʹߦ͏ - ͏ͪͷνʔϜansibleͰ͍ͬͯ·͢ ‣
GitHubʹͱΓ͋͑ͣίʔυΛ͋͛Δ ‣ ຊޠʢϨΪϡϨʔγϣϯʣΛਖ਼͘͠ཧղ͢Δ
ରࡦʢศརεΫϦϓτʣ • ศརεΫϦϓτΛॻ͍͓ͯ͘
ISUCONͷԿ͕͍͍ͷ • WebΞϓϦέʔγϣϯʹؔ͢Δجຊతͳׂࣝʹͭ ͍ͯͷཧղ͕ਂ·Δ • ܭଌ͢ΔΫη͕ͭ͘ɹ • ΞϓϦέʔγϣϯΛॻ͘ͱ͖ʹ, ύϑΥʔϚϯεΛҙࣝ͢ ΔΑ͏ʹͳΔ
• systemdͱ͔nginxͱ͔MySQLͱ͔ͦͷ͋ͨΓͷࣝΛ ͘ಘΒΕΔ • ׂͱͦͷ࣌ͷΓͱ͔͕औΓೖΕΒΕ͍ͯΔ • ָ͍͠
ENJOY TUNING!