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
障害にすてるところなし
Search
tomoya yokota
March 11, 2017
Technology
8
3.9k
障害にすてるところなし
tomoya yokota
March 11, 2017
Tweet
Share
More Decks by tomoya yokota
See All by tomoya yokota
レガシーSolrの Elasticseach移行 Cybozu Tech Meetup #14
yokotaso
0
330
introduction-to-modern-gc
yokotaso
10
2.9k
product-sutainability
yokotaso
0
290
the-art-of-develop-culture-at-cybozu
yokotaso
0
3.1k
Go-To-Java9
yokotaso
0
210
Other Decks in Technology
See All in Technology
Pythonを活用したLLMによる構造的データ生成の手法と実践
brainpadpr
2
210
How CERN serves 1EB of data via FUSE
ennael
PRO
0
15k
Making Linux sucks less
ennael
PRO
0
480
AI時代のアジャイル開発(XP祭り2024版) / Agile Development in the AI Era in XPJUG
takaking22
13
3.4k
ドメインと向き合う - 旅行予約編
hidenorigoto
4
510
Dual level of task scheduling for VM workloads
ennael
PRO
0
180
All your memory are belong to… whom?
ennael
PRO
0
520
【shownet.conf_】3Dアプローチで守るセキュリティ
shownet
PRO
0
270
仮想化って何だろう
shkoga
0
140
Amazon BedrockとPR-Agentでコードレビュー自動化に挑戦・実際に運用してみた
diggymo
0
550
トークナイザー入門
payanotty
2
330
ITエンジニアとして知っておいてほしい、電子メールという大きな穴
logica0419
1
300
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Documentation Writing (for coders)
carmenintech
65
4.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
37
6.8k
In The Pink: A Labor of Love
frogandcode
139
22k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
91
16k
The Invisible Side of Design
smashingmag
297
50k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Agile that works and the tools we love
rasmusluckow
327
21k
The Language of Interfaces
destraynor
154
24k
Bash Introduction
62gerente
608
210k
A designer walks into a library…
pauljervisheath
201
24k
Transcript
োʹͯ͢Δͱ͜Ζͳ͠ αΠϘζגࣜձࣾ @yokotaso
We’re sorry for …
ӡ༻োͷ • ͝໎Λ͓͔͚ͨ͠Έͳ͞· ͝ΊΜͳ͍͞ • ࢹɾରࡦɾௐࠪɾվળΛʑੋվળ • վળ·ͩ·ͩಓ • αΠϘζΛӬ͘ΑΖ͓͘͠ئ͍͠·͢
ΫϥυͷنͱՔಇ • ͝ܖ͍͍͍ͨͩͯΔձ༷ࣾ 1ສ8ઍࣾ
ӡ༻ো
Boo!
ͦΜͳ͜ͱͳ͍
ŧŔŕŪGOOD
ࣦഊ͔ΒపఈతʹֶͿ োֶश 4
جૅࣝΛ͚ͭΔ
جૅతͳૉཆΛຏ͘ ίϯϐϡʔλͷجૅΛΖ͏
ੜ͖ͨσʔλ͕োʹ͋Δ • ϘτϧωοΫͲ͜ʁ • େنαʔϏεٕज़ೖΛ ࢀর͠ͳ͕Βௐࠪ͢ΔͱษڧʹͳΔ • ϝτϦΫεࢹπʔϧͰ؍͠Α͏ • جૅతͳࣝಎ͕
োௐࠪͷͨͼʹຏ͔ΕΔ
ࣝͱܦݧཌྷΛत͚ͯ͘ΕΔ • ະͷʹग़ձͬͨΒཱͪฦΔॴ • ͍͠΄Ͳղܾͷࢳޱʹ • ҰਓͰௐࠪΛਐΊΒΕΔΑ͏ʹͳͬͨ • ϝτϦΫε͔ΒݪҼΛ༧Ͱ͖ΔΑ͏ʹ
ίϯϐϡʔλʔͷେࣄͳࣄ ো͕ڭ͑ͯ͘Εͨ
ࣝΛਂ۷Γ͢Δ
ಈ࡞ݪཧΛਂ͘ཧղ͢Δ ো࠷ߴͷྑͰ͋Δ
MySQLͷΠϯσοΫε͕͑ͳ͍
খ͞ͳෆ۩߹վम͕ݪҼ • ॏෳআڈͷͨΊʹGROUP BY Λ҆қʹ͚ͭͨͷ͕ݪҼ • JOIN࣌ʹར༻ͨ͠ΠϯσοΫε͕GROUP BY ʹ࠶ར༻Ͱ͖ͳ͍ •
େྔͷϨίʔυʹରͯ͠filesort͕ͬͯྦ
ཧղͨͭ͠Γʹͳͬͯ·ͤΜ͔ • োͷͨͼʹجຊతͳಈ࡞ݪཧΛ֬ೝ • োௐࠪΛ௨ͯ͠ಈ࡞ݪཧͷཧղ͕ਂ·Δ • ಈ࡞ݪཧ͕ਂ͘ཧղͰ͖͍ͯͳ͍ؾ͖ͮ
ো࠷ߴͷྑͰ͋Δ
νʔϜͰڧ͘ͳΔ
ࣦഊΛΏΔ͢จԽ ࣦഊͷڞ༗ஏ͕ͩʹཱͭʂ
Seasar2 S2DAO Ҡߦࣦഊ
͝ΊΜͳ͍͞!͝ΊΜͳ͍͞! • SeasarͷEOLʹ͏Spring FrameworkҠߦ • Seasar S2DAO͔ΒHibernateͷҠߦࣦഊ • ύϑΥʔϚϯεྼԽɺOutOfMemoryError… •
શഊͰ͢ɻ͝໎Λ͓͔͚͠·ͨ͠
ࣦഊΛड͚ೖΕΔจԽ
PostmortemΛॻ͜͏ • Λ٬؍తʹཧ͢ΔͨΊʹ༗༻ • ࣦഊΛੳɾڞ༗ɾࢭ • AWS S3 େنো •
git lab ຊ൪σʔλআ
ࣦഊΛڞ༗Ͱ͖ΔจԽΛ࡞Δ • ࣦഊΛڞ༗ͯ͠܁Γฦ͞ͳ͍จԽΛ࡞Ζ͏ • ࣦഊʹ͍ͭͯޠΔਓͷଘࡏҙٛେ͖͍ • ࣦഊΛڞ༗ͯ͘͠ΕΔਓʹѹతײँ • ݠڏɾଚܟɾ৴པ(HRT) ΛԿ֬ೝ͠Α͏
• ݸਓͷࣦഊͰͳ͍ɺ৫ͷࣦഊͩ
None
ࣦഊޭͷதؒͰ͔͠ͳ͍
సΜͰͨͩͰى͖͕͋Βͳ͍ʂ • ࣦഊͷչ͕͠͞վળʹͭͳ͕Δ • S2Dao͔ΒHibernateͷҠߦࣦഊΛ׆͔ͯ͠ • JDBCTemplateΛར༻ͯ͠࠶ઃܭ • OSSͱͯ͠ެ։༧ఆ
ࣦഊͷڞ༗ஏ͕ͩʹཱͭʂ
Α͜͠·ͳੜ͖ํ
ͣͿͱ͘ੜ͖Δ ੜ͖͍ͯΔ͚ͩͰ·Δ͏͚
Java ṖͷύϑΥʔϚϯεྼԽ
ղܾ͠·ͨ͠ (๑•̀ŷ•́)و✧ • JIT Compiler͕ఀࢭ͢Δέʔε͕͋Δ • JVM͕JIT Compileͨ͠ίʔυΛࣺͯΔ • JIT
Compiler͕෮ؼͤͣɺ࠷దԽͷ͔͔Βͳ͍ Byte CodeΛJava͕࣮ߦ͠ଓ͚Δ • ύϑΥʔϚϯεྼԽΛى͜͢
ղܾͷࢳޱ • GCʹׂΓͯΔThread CPU͔Βܾ·Δ • GCʹׂΓͯΒΕͨThread CPUΛ100%ઐ༗͢Δ
ղܾͷࢳޱ • GCʹΑΔCPUར༻Λߟྀͯ͠༨༟͕͋Δ • Full GCൃੜ͍ͯ͠ͳ͍ • GCΛݪҼ͔Βഉআ • CPUෛՙ্͕͕ΔέʔεΛMLͰಡΈ͋͞Δ
ϒϩάʹެ։
None
͝Ѫಡ͋Γ͕ͱ͏͍͟͝·͢ʂ • ͜ͷهࣄ͚ͩͰ 1ສ5ઍPV • ࠷ऴతʹ 700ͯϒ͘Β͍ • OSS͓ੈʹͳΓͬͺͳ͠ •
ใެ։Ͱߩݙ͍ͨ͠ؾ࣋ͪ
ͣͿͱ͘ੜ͖ΔΑ͏ʹ • ໘ന͍ٕज़هࣄʹͳͬͨΒṶ͚ͷ • ໘ന͍ࣄ͋ͬͨΒ͍͍ͳ͕ϞνϕʔγϣϯʹมԽ • ࠶ىಈͰճආͭͭ͠ظؒɺো͕ൃੜ͍ͯͨ͠ • Θ͔Βͳ͍͍ͯ͘ɾಀ͍͍͛ͯ •
ੜ͖͍ͯΔ͚ͩͰ·Δ͏͚ͷਫ਼ਆ
ௐΔ͚ͩͰ·Δ͏͚ʂ
োֶशɺ͔ͲΓ·͔ͬ
োʹͯ͢Δͱ͜Ζͳ͠