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
Narimichi Takamura
September 12, 2014
Technology
0
430
その ionice、ほんとに効いてますか?
2014/08/14、社内勉強会の資料です。
Narimichi Takamura
September 12, 2014
Tweet
Share
More Decks by Narimichi Takamura
See All by Narimichi Takamura
Observability — Extending Into Incident Response
nari_ex
2
980
インシデントキーメトリクスによるインシデント対応の改善 / Improving Incident Response using Incident Key Metrics
nari_ex
1
12k
組織的なインシデント対応を目指して〜成熟度評価と改善のステップ〜 / Towards an Organized Incident Response - Maturity Assessment and Improvement Steps -
nari_ex
7
9.3k
Waroomの開発モチベーションと今後のロードマップ / Waroom development motivation and roadmap
nari_ex
1
1.7k
Engineering with Business Impact
nari_ex
2
330
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
380
私が Engineering Manager になるまでに経験してきたこと、大切にしてきたこと / Lecture materials for Introduction to Venture Business at UEC
nari_ex
0
260
Other Decks in Technology
See All in Technology
Hardware/Software Co-design: Motivations and reflections with respect to security
bcantrill
1
130
Kusakabe_面白いダッシュボードの表現方法
ykka
0
300
Qiita Bash アドカレ LT #1
okaru
0
190
善意の活動は、なぜ続かなくなるのか ーふりかえりが"構造を変える判断"になった半年間ー
matsukurou
0
560
kintone開発のプラットフォームエンジニアの紹介
cybozuinsideout
PRO
0
540
会社紹介資料 / Sansan Company Profile
sansan33
PRO
12
400k
Security Hub と出会ってから 1年半が過ぎました
rch850
0
150
形式手法特論:コンパイラの「正しさ」は証明できるか? #burikaigi / BuriKaigi 2026
ytaka23
17
6.3k
ファインディにおけるフロントエンド技術選定の歴史
puku0x
2
1.5k
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
63k
Models vs Bounded Contexts for Domain Modularizati...
ewolff
0
200
Scrum Guide Expansion Pack が示す現代プロダクト開発への補完的視点
sonjin
0
730
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Measuring & Analyzing Core Web Vitals
bluesmoon
9
730
Making Projects Easy
brettharned
120
6.5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
Rails Girls Zürich Keynote
gr2m
95
14k
Paper Plane (Part 1)
katiecoart
PRO
0
3.2k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
610
The SEO identity crisis: Don't let AI make you average
varn
0
52
A Modern Web Designer's Workflow
chriscoyier
698
190k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
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༏ઌมߋͰ͖ΔΑ