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
その ionice、ほんとに効いてますか?
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Narimichi Takamura
September 12, 2014
Technology
460
0
Share
その ionice、ほんとに効いてますか?
2014/08/14、社内勉強会の資料です。
Narimichi Takamura
September 12, 2014
More Decks by Narimichi Takamura
See All by Narimichi Takamura
Observability — Extending Into Incident Response
nari_ex
2
1.2k
インシデントキーメトリクスによるインシデント対応の改善 / Improving Incident Response using Incident Key Metrics
nari_ex
1
13k
組織的なインシデント対応を目指して〜成熟度評価と改善のステップ〜 / Towards an Organized Incident Response - Maturity Assessment and Improvement Steps -
nari_ex
7
9.8k
Waroomの開発モチベーションと今後のロードマップ / Waroom development motivation and roadmap
nari_ex
1
1.8k
Engineering with Business Impact
nari_ex
2
350
How We Foster Reliability in Diversity
nari_ex
14
13k
SRE Practices in Organizations
nari_ex
16
11k
Hardening におけるトラブルシューティング / Troubleshooting in Hardening
nari_ex
1
400
私が Engineering Manager になるまでに経験してきたこと、大切にしてきたこと / Lecture materials for Introduction to Venture Business at UEC
nari_ex
0
280
Other Decks in Technology
See All in Technology
色を視る
yuzneri
0
310
20260423_ハドソンのエロゲを追え_レトロゲーム
poropinai1966
0
100
AIはハッカーを減らすのか、増やすのか?──現役ホワイトハッカーから見るAI時代のリアル【MEGU-Meet】
cscengineer
PRO
0
250
AI活用時代の事業判断高度化を導くエンジニアリング基盤 / 20260424 Atsushi Funahashi
shift_evolve
PRO
2
120
AI駆動開発で生産性を追いかけたら、行き着いたのは品質とシフトレフトだった
littlehands
0
250
Cortex Codeのコスト見積ヒントご紹介
yokatsuki
0
130
AIと乗り切った1,500ページ超のヘルプサイト基盤刷新とさらにその先の話
mugi_uno
1
270
Keeping Ruby Running on Cygwin
fd0
0
200
Building Production-Ready Agents Microsoft Agent Framework
_mertmetin
0
140
GKE Agent SandboxでAIが生成したコードを 安全に実行してみた
lamaglama39
0
170
フロントエンドの相手が変わった - AIが加わったWebの新しいインターフェース設計
azukiazusa1
29
7.4k
AIの揺らぎに“コシ”を与える階層化品質設計
ickx
0
190
Featured
See All Featured
Navigating Team Friction
lara
192
16k
The Cult of Friendly URLs
andyhume
79
6.9k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
170
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
360
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
280
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Making Projects Easy
brettharned
120
6.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
150
A Soul's Torment
seathinner
6
2.7k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
320
Transcript
ͦͷ IONICE, ΄Μͱʹޮ͍ͯ·͔͢ʁ TAKAMURA Narimichi @nari_ex hbstudy-2014-08-14
what is ionice ? I/O ͷॲཧ༏ઌΛࢦఆ͢ΔLinuxίϚϯυ nice ίϚϯυͷ I/O όʔδϣϯ
nice ίϚϯυͰ I/O ༏ઌΛ੍ޚෆՄ
I/O ༏ઌΫϥε RT ( Real-time ) ࠷ߴ༏ઌ BE ( Best-Effort
) σϑΥϧτ༏ઌ Idle ࠷༏ઌ
BE: Ϋϥε༏ઌ BE ΫϥεͷΈɺΫϥε༏ઌ͕͋Δ ༏ઌ 0ʙ7 ·Ͱͷ 8ஈ֊ 0͕࠷ߴ༏ઌɺ7͕࠷༏ઌ ༏ઌΫϥεͷΛ͑ͳ͍
RT > BE (0) IDLE < BE (7)
None
How to ionice RT ΫϥεΛࢦఆ: ionice -c1 BE ΫϥεΛࢦఆ: ionice
-c2 -n <0ʙ7> IDLE ΫϥεΛࢦఆ: ionice -c3
༨ஊ: nice ίϚϯυ Ϋϥεͳ͍ ༏ઌ ( nice ) -20ʙ19
-20 ͕࠷ߴ༏ઌɺ19͕࠷༏ઌ
ෛՙΛ࠷খݶʹ͍͑ͨʂ
ionice, nice Λۦͯ͠…
# ionice -c3 nice -n19
͜ΕͰᘳͩʂʂʂ
None
ͪΐͬͱ·ͬͯ
ͦͷ IONICE, ΄Μͱʹޮ͍ͯ·͔͢ʁ
None
ionice ͕ޮ݅͘ I/O εέδϡʔϥ ReadͳͷʁWriteͳͷʁϑϥάʁ ϑΝΠϧ࡞ϑϥά Ωϟογϡͷ༗ແ
I/O Scheduler…
VFS Χʔωϧۭؒ γεςϜίʔϧ Ϣʔβۭؒ ཧ σόΠε ϑΝΠϧγεςϜ σΟεΫΩϟογϡ ൚༻ϒϩοΫ ཧ
σόΠε ϓϩηε I/Oεέδϡʔϥ σόΠε υϥΠό σόΠε υϥΠό
݅ͦͷ̍: I/O Scheduler(1) CFQ εέδϡʔϥҎ֎ແཧ Linux ඪ४ͷεέδϡʔϥ CFQ Amazon Linux
Noop ͳͷͰҙ Unbreakable Linux Deadline ͳ ͷͰҙ
σόΠεͻͱͭʹI/Oεέδϡʔϥͻͱͭ σόΠεΛ·͙ͨॲཧͷ߹ʹҙ ॲཧʹؔΘΔͯ͢ͷσόΠεΛ֬ೝͤΑ # cat /sys/block/<DEV_NAME>/queue/ scheduler ݅ͦͷ̍: I/O Scheduler(2)
݅ͦͷ̎: I/Oॲཧͷ༰(1) Write() جຊతʹޮ͔ͳ͍ O_DIRECT, O_SYNC Λϑϥάཱͯ ͯΕOK -o sync
ͰϚϯτ͞ΕͨϑΝΠϧ γεςϜͳΒOK
݅ͦͷ̎: I/Oॲཧͷ༰(2) Read() ͯ͢ʹޮ͘Θ͚Ͱͳ͍ σΟεΫΩϟογϡ͕͋Δͱμϝ σΟεΫΞΫηεͳ͍͔Βવ
·ͱΊ ionice ҎԼͷ ̎݅Λຬͨͨ࣌͠ʹͪΌΜͱಈ͘ I/O Scheduler ͕ CFQ ಛఆͷI/Oॲཧ Ωϟογϡ͞Ε͍ͯͳ͍ϑΝΠϧͷRead
ಛघϑϥάͷཱͬͨ Write
͍͞͝ʹ man ioprio_set Λಡ͏ ϑΝΠϧ࡞ϑϥάͷࡉ͔͍͜ͱ·ͨࠓ O_SYNC, O_DSYNC, O_FSYNC… ionice -p
<PID> Λ͏ͱɺىಈதͷϓϩη εͷI/O༏ઌมߋͰ͖ΔΑ