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
Takamura Narimichi
September 12, 2014
Technology
0
180
その ionice、ほんとに効いてますか?
2014/08/14、社内勉強会の資料です。
Takamura Narimichi
September 12, 2014
Tweet
Share
More Decks by Takamura Narimichi
See All by Takamura Narimichi
Engineering with Business Impact
nari_ex
2
200
How We Foster Reliability in Diversity
nari_ex
14
12k
SRE Practices in Organizations
nari_ex
16
4.4k
Hardening におけるトラブルシューティング / Troubleshooting in Hardening
nari_ex
1
220
私が Engineering Manager になるまでに経験してきたこと、大切にしてきたこと / Lecture materials for Introduction to Venture Business at UEC
nari_ex
0
140
運用技術者組織の設計と運用 / Design and operation of operational engineer organization
nari_ex
11
7k
エンジニアリング組織の基礎知識 / Basic knowledge of engineering organization
nari_ex
10
4.2k
エンジニアリング組織アーキテクチャの調査と設計要点に対する考察 / Investigation of engineering organization architecture and consideration of design points
nari_ex
7
2.6k
MSP における SRE の実践 / The practice of SRE in MSP
nari_ex
2
2.4k
Other Decks in Technology
See All in Technology
**強い**エンジニアのなり方 - フィードバックサイクルを勝ち取る / grow one day each day
soudai
60
17k
Hands-on / Kaname Frusawa / Cloud Compare Users Meetup 2024 at University of Tokyo on April 17
paraworld
2
470
クラウドサインにおけるプロダクトマネージャーの役割と開発プロセス / 20240410_cloudsign-PdM
bengo4com
1
670
株式会社EventHub・エンジニア採用資料
eventhub
0
1.9k
The CloudCompare project by Dr. Daniel Girardeau-Montaut
kentaitakura
0
500
Four keys改善の取り組み事例紹介
sansantech
PRO
2
230
ユーザーストーリーのレビューを自動化したみたの
bun913
1
290
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
3
180
HEXA OSINT CTF V3 作戦会議
meow_noisy
0
110
エンタープライズ環境下での Active Directory の運用 TIPS
tamaiyutaro
1
1.5k
[PlatformCon 24] Platform Orchestrators: The Missing Middle of Internal Developer Platforms?
danielbryantuk
0
170
「ふりかえりのふりかえり」をふりかえり、実のあるふりかえりにする
naitosatoshi
0
220
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
276
33k
Agile that works and the tools we love
rasmusluckow
323
20k
Code Review Best Practice
trishagee
54
15k
Clear Off the Table
cherdarchuk
82
310k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
320
20k
Creatively Recalculating Your Daily Design Routine
revolveconf
209
11k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
20
1.6k
Rails Girls Zürich Keynote
gr2m
91
13k
Building Applications with DynamoDB
mza
88
5.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
658
120k
How STYLIGHT went responsive
nonsquared
92
4.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
6
990
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༏ઌมߋͰ͖ΔΑ