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
290
その ionice、ほんとに効いてますか?
2014/08/14、社内勉強会の資料です。
Narimichi Takamura
September 12, 2014
Tweet
Share
More Decks by Narimichi Takamura
See All by Narimichi Takamura
組織的なインシデント対応を目指して〜成熟度評価と改善のステップ〜 / Towards an Organized Incident Response - Maturity Assessment and Improvement Steps -
nari_ex
7
6.4k
Waroomの開発モチベーションと今後のロードマップ / Waroom development motivation and roadmap
nari_ex
1
1k
Engineering with Business Impact
nari_ex
2
250
How We Foster Reliability in Diversity
nari_ex
14
13k
SRE Practices in Organizations
nari_ex
16
8.5k
Hardening におけるトラブルシューティング / Troubleshooting in Hardening
nari_ex
1
280
私が Engineering Manager になるまでに経験してきたこと、大切にしてきたこと / Lecture materials for Introduction to Venture Business at UEC
nari_ex
0
190
運用技術者組織の設計と運用 / Design and operation of operational engineer organization
nari_ex
11
9.1k
エンジニアリング組織の基礎知識 / Basic knowledge of engineering organization
nari_ex
10
4.4k
Other Decks in Technology
See All in Technology
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
220
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
140
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
200
Mastering Quickfix
daisuzu
1
320
プロダクト活用度で見えた真実 ホリゾンタルSaaSでの顧客解像度の高め方
tadaken3
0
260
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
320
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
150
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
4
1k
Next.jsとNuxtが混在? iframeでなんとかする!
ypresto
2
830
Storybook との上手な向き合い方を考える
re_taro
5
2.1k
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
130
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
4
140
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Making Projects Easy
brettharned
115
5.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
430
RailsConf 2023
tenderlove
29
910
KATA
mclloyd
29
14k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Fireside Chat
paigeccino
34
3k
What's new in Ruby 2.0
geeforr
343
31k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Six Lessons from altMBA
skipperchong
27
3.5k
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༏ઌมߋͰ͖ΔΑ