$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
インフラエンジニアが学んだ Go言語での並行処理失敗パターン
Search
nwiizo
November 16, 2021
3
1.6k
インフラエンジニアが学んだ Go言語での並行処理失敗パターン
2021/11/16 Infra Study 2nd #7「SREと組織」にて発表
https://forkwell.connpass.com/event/228038/
nwiizo
November 16, 2021
Tweet
Share
More Decks by nwiizo
See All by nwiizo
メインテーマはKubernetes
nwiizo
1
220
SREの前に
nwiizo
12
3.1k
2024年版 運用者たちのLLM
nwiizo
4
880
Platform Engineering と SRE の門
nwiizo
16
5.6k
運用者の各領域で向き合うLLM
nwiizo
1
470
可観測性ガイダンス
nwiizo
14
3.7k
書を捨てよ、現場へ出よう
nwiizo
12
11k
走馬灯のIaCは考えておいて
nwiizo
10
5.9k
SREとPlatform Engineerの交差点
nwiizo
9
6.7k
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1366
200k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Building an army of robots
kneath
302
43k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Code Reviewing Like a Champion
maltzj
520
39k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
870
The Language of Interfaces
destraynor
154
24k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
460
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Thoughts on Productivity
jonyablonski
67
4.3k
Transcript
݄*OGSB4UVEZOEʮ43&ͱ৫ʯ!OXJJ[P ΠϯϑϥΤϯδχΞֶ͕Μͩ (PݴޠͰͷฒߦॲཧࣦഊύλʔϯ ̑ͱ͍͏ͷΕͯ֓ཁ͚ͩ࡞ͯ͠ࢿྉ࡞࣌ʹ٧ΜͩͷͰ ͋ͱͰɺϒϩάॻ͖·͢ɻ
TIBLFձࣾʹస৬ͯ͠ ܦաͨ͠ !OXJJ[PͰ͢
ΠϯϑϥΤϯδχΞͷඇಉظॲཧ w ʹΑΔόοΫάϥϯυॲཧ w YBSHTʹΑΔฒྻ࣮ߦ time seq 10 | xargs
-t -P1 -n1 'sleep' sleep 1 sleep 2 … ________________________________________________________ Executed in 55.11 secs fish external usr time 13.14 millis 0.19 millis 12.94 millis sys time 47.95 millis 2.26 millis 45.69 millis time seq 10 | xargs -t -P3 -n1 'sleep' sleep 1 sleep 2 … ________________________________________________________ Executed in 22.04 secs fish external usr time 10.70 millis 0.18 millis 10.52 millis sys time 33.78 millis 2.25 millis 31.53 millis w Ҿͷ͚ͩ4MFFQ͢ΔϫϯϥΠφʔΛ ฒྻͰ࣮ߦ͢Δ߹ ඵͰྃ ͱฒྻͰ࣮ߦͨ͠߹ ඵͰྃ $ ίϚϯυ & [1] 4403 w ίϚϯυͷ࠷ޙʹΛՃ͢Δ͜ͱʹΑΓɺ ͦͷίϚϯυΛόοΫάϥϯυͰಈ͔͢͜ͱ͕Ͱ͖Δɻ ແअؾʹΔͱμϝ͕ͩίϯτϩʔϧՄೳ ແअؾʹGPSΛճ͢ͱΫϥΠΞϯτɺαʔόʔ ͞·͟·ͳͷ͕ࢮ͵ େ͖ͳγΣϧεΫϦϓτ
(PݴޠʹΑΔฒྻॲཧͷ
(PݴޠʹΑΔฒྻॲཧͷ ຊޠͰྑ͍ͷ͕ͨ͘͞Μ͋Δ IUUQTMFBSOJOHPSFJMMZDPNMJCSBSZWJFXHPZBOZVOJZPSVCJOHYJOHDIVMJ IUUQT[FOOEFWITBLJCPPLTHPMBOHDPODVSSFODZ ͳͷͰɺجຊతجૅͷ͠·ͤΜɻ ͪͳΈʹɺͦͦ͜͜େ͖ͳγεςϜΛ࡞Δ͜ͱʹͳΔͱઈରʹಡΉ͜ͱʹͳΔ
ͷͰɺࠓճͷ-5Ͱ ΠϯϑϥΤϯδχΞ͕ؕΓͦ͏ͳ (PݴޠͰͷฒߦॲཧࣦഊύλʔϯ
্͔Β࣮ߦ͞ΕΔͱ͍͏ࡨ֮ͰӬԕʹσόοά͕ऴΘΒͳ͍ w Ұମɺ͍͔ͭΒ্͔Β࣮ߦ͞ΕΔͱɻɻɻ w ιʔείʔυ্͔ΒԼʹ͔ͬͯॻ͍͍ͯ͘͜ͱ͕ଟ͍ͱ ࢥ͍·͢ɻ͜ͷ͜ͱ͔Βʮίʔυ্͔ΒԼʹॱ൪ʹ࣮ߦ͞ ΕΔͩΖ͏ʯͱ͍͏ࡨ֮ʹؕΓ͕ͪͰ͕͢ɺฒߦॲཧΛ͢ Δ߹ʹ͜ΕΒ͕࣮ߦ͞ΕΔ·Ͱ͔Βͳ͍ɻ
ͦͷͨΊɺຊʹ͔ΒͣʹͱΜͰͳ͍λΠϛϯάͰ ࢥͬͯͳ͍ॲཧ͕࣮ߦ͞ΕΔ߹͕͋ΔͷͰ ͜ͷࡨ֮ૣʑʹࣺͯڈ͙ͬͯ͢ʹͷલͷ ϩάͱਅ伨ʹ͖߹͍·͠ΐ͏ʂ w ฒߦॲཧʹ͓͚Δ࣮ߦॱ൪ͷอূΛ͍ͬͯ͘ w εϦʔϓʹΑΔॱ൪อূ w ΞτϛοΫੑ w TZOD.VUFY
ͦΕɺෳͷϩδοΫΛڠௐͤ͞Α͏ͱͯ͠·͔͢ʁϚδʁ w ϩδοΫΛݟͨ͠ํ͕͍͍߹ଟ͋͘Δ w ͋ͳ͕ͨຊʹඞཁͳͷฒߦੑͷ͋ΔॲཧͰ͔͢ʁ w 3BDF$POEJUJPO ڝ߹ঢ়ଶ Λආ͚Δඞཁ͕͋Δ w
ڞ༗ϝϞϦʹਖ਼͘͠ΞΫηε͠ͳ͍ͱ͍͚ͳ͍ w ষେن։ൃͰͷฒྻॲཧͳͲΛख़ಡ͢Δ͜ͱ͕ඞཁ ɹෆ݈શͳΰϧʔνϯΛ͢ͳͲΊͪΌͪ͘Ό͍͠ w ඞཁͳͷடংΛ࣋ͬͨඇಉظॲཧ͡ΌͶʁ w σόοάͷ࣌ʹSVOUJNF(0."9130$4 ΛߴΊͨΓͯ͠ ڝ߹Λ֬ೝ͢Δ࡞ۀͱ͔ਖ਼ɺͨ͘͠ͳ͍ɻɻɻ w HPSPVUJOFͷಉظɺඇಉظʹ͍ͭͯ ڥม࣮Ͱ͓࣋ͬͯ͘ͱ߹͕ଟ͍͜ͱ͕͋Δ O`reillyɹGoݴޠʹΑΔฒߦॲཧɹΑΓҾ༻
࣮ߦ࣌ͷෛՙͦͷڥͰͦͷλΠϛϯάͰ࣮ߦ͢Δ·Ͱ͔Βͳ͍ w ࣮ߦ͢Δ·Ͱ͔Βͳ͍ w ෛՙͷ͔͔ΔॲཧΛ੍ݶͳ͠ʹฒྻԽͯ͠ຊʹҙຯͳ ͘Ή͠ΖѱͰ͢ɻॲཧͷฒྻΛ༧ଌՄೳͳ߹ɺͦ ΕΛ࣮ߦ͢ΕΑ͍Ͱ͕͢ෆ໌֬ͳ߹ʹɺ$16ͷί Ξ͕ͨΓʹͳΔ͜ͱ͕͋Γ·͢ɻ (PҎ߱ɺσϑΥϧτίΞͷʹͳΓ·͢ɻ
ͦͷͨΊɺຊ൪ڥͱखݩͰ࣮ߦ͕࣌ؒมΘΔ͜ͱ͕͋Δ w ͪ͜ΒSVOUJNF(0."9130$4 SVOUJNF/VN$16 Λຊ൪Ͱ͢ͳ w ·ͨɺຊ൪ӡ༻தͷόονॲཧΛᢞΊ͔͔ͯΔͱ λΠϛϯάʹΑͬͯطʹ"1*%#ʹෛՙֻ͕͔ͬͯ Δɻଞͷόον͕ͬͯΔͳͲɻʰனؒʹखݩͷڥ͔Β ͏·͘ߦͬͨͷͰຊ൪Ͱ0,ͳͷͩʱͱؾܰʹߟ͑ͯ ͍Δͱͦͷͷʹढ͍ͷΦϯίʔϧ͕ݦݱ͢ΔΑ
w ্͔Β࣮ߦ͞ΕΔͱ͍͏ࡨ֮ͰӬԕʹσόοά͕ऴΘΒͳ͍ w ͦΕɺෳͷϩδοΫΛڠௐͤ͞Α͏ͱͯ͠·͔͢ʁϚδʁ w ࣮ߦ࣌ͷෛՙͦͷڥͰͦͷλΠϛϯάͰ࣮ߦ͢Δ·Ͱ͔Βͳ͍ 'JO ࠓʮ43&ͱ৫ʯͳͷͰ͕͢ ৫ʹؔͯ͠ϋʔτϏʔτͱڞʹԿ͔ݴٴ͔ͨͬͨ͠ͷͰ͕͢ ͍͍ײ͡ͷΛࢥ͍͔ͭͳ͔ͬͨͷͰऴྃͰ͢ɻ
ʮ43&(BQTཧͱ࣮ફ͔Β43&Λ࠶ߟ͢ΔʯΈ͍ͨͳΠϕϯτ ͬͯͷͰ43&ͷ୳ٻͷͲͷষ͕໘ന͔ͬͨͱ͍͏Λ͢ΕΑ͔ͬͨ ͱޙչ͢ΔOXJJ[PͰ͋ͬͨ ·ͱΊ ͜͏͍͏ܦݧ͕ΞϓϦέʔγϣϯଆͷൃݟʹܨ͕Δ