銝 擐隞蝝寧′蝣 I/O Scheduler) e* Z1 M8 |* z2 E& \: Y( `
% ?4 [* @5 c7 w6 p. A7 m9 f5 c: A/ A8 w; q Q, H' A
I/O Scheduler臭暻潘Wiki隤芣:
! p& M1 o# s1 V: y3 Y1 jInput / Output Scheduling or I/O Scheduling is a term used to describe the method computer operating systems decide the order that block I/O operations will be submitted to storage volumes. I/O Scheduling is sometimes called 'disk scheduling'.
: [* x/ J. ]) d5 W! S; N7 E+ \9 b' E5 Z- Y1 }# U& H! @
! q# L0 K0 i! q( Z' W. e8 V3 J蝪∪桃隤迎撠望航臭誑蝬曹閮剖嚗靘啗矽渡蝣摮(I/O)璅∪銝蝔株身摰撌亙瑯6 m( q/ L3 p. |
1 ^* D$ D/ e. X- U- w
7 v7 P+ r# g1 Z桀Linux舀游蝔埋/O Schedule璅∪嚗亦:
8 x; b& v' n; w. y3 \+ C2 v+ a- |9 G6 M0 H6 _, ^) p- r- O7 Z: I
( E3 ~4 y" I. ~# |/ y6 [$ P1 W1 N
Noop Scheduler (蝪∠迂noop) -- RIAD SSD 撱箄降雿輻 noop" Y. b7 b; H7 @3 P; d
臭誑蝞舀箸砌蝪∪Scheduler嚗銝餉冽潔鈭頛箇孵亦頠擃蝖祇剝雿啣銝哨銝鈭頠/蝖祇撌脩瑕芸楛I/O摮璈塚銝撠潛頂蝯望詨閬瘙頛撠嚗璅Scheduler瘥頛拙典典亙啣蝟餌絞銝准
5 r& v e& _; G: c* W6 Q& }. }) w, o& {# A
3 c1 f3 k5 {, Q& ]
Completely Fair Queuing (蝪∠迂cfq)) S$ h. o% I, y: Z# X- E# u) h
憿批蝢抬撠蝖祉蝟餌絞冽閬I/O隞餃嚗蝯衣詨雿摨(Queuing)嚗璅Scheduler拙冽潔砌蝙刻獢銝餉衣雿啣嚗芸2006撟12Linux Kernel 2.6.18銝渲喃伐CFQ Scheduler銝湔烊inux詨閮剔 I/O scheduler
g0 k' a; s3 V1 G G5 [; @) f) U. Q9 q# j7 D: u5 z3 l
" s/ f& l2 K. F7 I. TAnticipatory Scheduling (蝪∠迂anticipatory)! S8 U1 H3 V: E7 i7 z8 y
曄銝摨行烊inux 2.6 Kernel 閮 I/O Scheduler 嚗婢nticipatory (/) 摮閫靘嚗憒蝚砌I/O箇橘銝亦蝟餌絞蝚砌I/O隢瘙雿嚗Anticipatory Scheduling撠Y銝閮剝閬6瘥怎"皜"()嚗皜穿臬函皜祉洵鈭I/O隢瘙航隞暻潛函嚗璅皜祇單芋撘函撣豢折脰冽摮蝟餌絞扳頛憭抒撱園莎撠文嗆臬鞈摨恍璅蝟餌絞啣嚗雿銋嚗Anticipatory Scheduling撠澆蝬脤隡箸券璅蝟餌絞銵函曄貊嗅末0 R; O' y* I% f n+ Q, F. I
3 C. R3 X& n! |' A% H. u$ @6 }- A
. \$ }, w8 d9 V6 I8 u+ W. l, M
Deadline Scheduler (蝪∠迂deadline) -- SATA 撱箄降雿輻 deadline
2 l1 N5 p# \" _% n7 c銝餉Scheduler撠望舫撠Anticipatory Scheduling蝻粹靘脰孵嚗摰撠蝤蝣銝剔撣賊剖啣銝函撘嚗閮銝西ˊ雿蝚血撠撱園脫雿摨嚗璅蝯撠潸摨怎頂蝯梯賣靘游摮
8 {6 e& B7 @, X" ^' H& x+ p$ A2 ?; a* E! G9 {6 v
% u: l) O7 l# N+ \3 g7 z& q
銝爹ed Hat Enterprise Linux 4 (2.6 Kernel) 剝Oracle10G鞈摨怨蝔埋/O Scheduler皜祈岫蝯 (鞈靘皞撅昱edhat砍豢)3 u8 I j4 l5 N4 k6 P* @( d7 I
/ t3 P% f7 z3 H! ~
; i, q+ p) _' q蝪∪桃閫鈭I/O Scheduler璅∪撌桃啣嚗臭誑撠銝脣閮剖靘剝銝I/O Scheduler脰賭隤踵∴擐曉啁恣I/O Scheduler蝟餌絞瑼獢嚗瑼獢舐牢at孵靘霈:3 H* C$ x' |+ \8 \' a$ m
* G/ S$ K. V2 N& z7 W2 }$ V! Z+ P2 y( D
#cat /sys/block/sda/queue/scheduler4 \/ \" N2 M$ _
[noop] anticipatory deadline cfq: d: n$ N# M0 e1 D& G/ C6 m
, m2 V' x% `; e0 Q- W
# v) d1 K {7 d r+ F/ C敺銝靘嚗臭誑仿桀I/O Scheduler璅∪摸oop. (獢 [ ] )
& x. {% E: Z+ [# t( D1 k+ M
* D! ?9 z" @' o6 n
9 r* c& A+ t9 W; R, P: G仿閬脰靽格寡矽湛雿瘜拍車:
; a, h- ]; J) [, b4 T6 ]8 s6 F4 X# F, [
3 _$ ~4 q$ E& _+ {% M9 ~6 X+ B
1. 格活隤踵湛唾矽游喟嚗蝬庸cho隞支湔遐/O Scheduler璅∪
( G* q, y9 @: l. _# D" z' E# q/ c O8 U
5 l& ~4 G9 _. i% e3 d
#echo Deadline>/sys/block/sda/queue/scheduler m+ c5 s) N" i% b. M
" m" y6 v) L1 A( x4 Q( `! m/ e% P5 e2 ^, D
銝靘箏桀sda憿蝖祉I/O Scheduler湔寧慣eadline璅∪嚗孵典喟嚗雿圈璈敺啁頂蝯望詨暺隤I/O Scheduler璅∪
3 o7 p$ Q0 }+ s7 g) m4 f, ~2 ~( G
5 W2 F( p6 T; A/ u" A3 T+ }3 l1 z" Q1 f
2. 刻蝟餌絞璈脰隤踵渡:
" Z! J) e% X* d* d2 r. [! q- E1 |隞乩214 O! I4 I" I Z1 S3 u
/etc/rc.local 批乩銵: echo anticipatory > /sys/block/sdb/queue/scheduler 函頂蝯梁GRUB璈瑼獢銝哨敺銝銵銝elevator=deadline嚗喳舀潭甈⊿璈敺賭Deadline Scheduler雿璅∪嚗憒銝靘:
* s D* B( D6 n' S O7 g- k: I' X8 D# R" i
/ h u" B5 {7 i. s, `- b+ j! S
蝺刻摩 /boot/grub/grub.conf; Y% ` Y1 r- A
* c) ^% ]5 t2 z6 G- U% o- C+ u! s5 j x
title Fedora Core (2.6.9-5.0.3.EL_lustre.1.4.2custom)
5 A$ @% m( e' P; Droot (hd0,0)- x; ^, X. C7 S z( b% _
kernel /vmlinuz-2.6.9-5.0.3.EL_lustre.1.4.2custom ro$ H6 C$ O, d; i0 ]* w
root=/dev/VolGroup00/LogVol00 rhgb noapic quiet elevator=deadline/ |$ @0 ]0 Q6 J' k. A p1 t% ?& q
8 M, }- H+ `) {7 P4 T# E4 i4 R N B( q- _7 Z+ c! M
! g, ^4 `+ J6 {1 ~( e+ [2 j0 I- ^
9 j7 U8 O7 O: J9 o3 J" ?) ^2 F鈭 乩靘舐′蝣 Readahead 敹怠
5 K2 x- ~& z: D5 O# A0 L! p. y0 }. f
- N0 a& h. k* `% C& s& A1 N3 G
其遢撠望頛摰寞閫嚗蝬梁頂蝯梁蝣霈閮剖靘霈踝蝬梯矽嵇eadahead Sectors憭批靘憓脩頂蝯梁蝣霈賢榆堆撠望航矽∠銝餉桃
3 t2 x \ T& P8 Q3 Q0 U- P
# Z/ e. V$ m# `' }- z; C- P
0 F. i/ P+ c2 O( P4 L. P蝬尉inux蝟餌絞隞: blockdev 靘瑼Z桀sda蝖祉Readahead Sectors憭批嚗蝭靘憒銝
, C7 E7 c( I3 \7 X; L _, T) B& }# Y2 Y9 t6 B3 ^' F$ F) ?* z
4 @# ~+ ?. Z# A, n6 m#blockdev --getra /dev/sda (蝟餌絞閮剜256M)( I+ b, E- v$ f
512
2 m) K* [% a X& C2 Z8 t, n+ V4 ~( ^: t2 _8 j0 z M
. U/ ~2 D. P/ R4 j: L; S
蝬梯矽游訾蒂撣嗅兄ectors憭批嚗靘脰質矽湛蝭靘憒銝:
1 r/ S% F7 y8 P( h* S6 m7 S! r @: `1 H% l y) T
$ F( \7 e0 r0 G! }
#blockdev --setra 4096 /dev/sda. _8 }/ L [; D0 S$ \
0 r. Z4 R/ D) n8 O) b' ?
- C9 F! K* a: U" G, e; _#blockdev --getra /dev/sda5 z y; z0 D. p+ b$ L. k: i! Q: L. P
4096
0 L7 L+ K N- V$ {! E5 A$ X9 m* n# W C/ K6 A
刻蝟餌絞璈芸閮剖:( \1 A: r6 F# v+ Q7 e. b/ }+ h* Y
/etc/rc.local 批乩銵:% [/ h* R0 f# w* V( Y1 t
blockdev --setra 4096 /dev/sda$ g6 V6 f) ~2 V. u& s/ ]# F
1 q1 e6 k% A/ M2 Z蝬拍車蝖祉質矽∠撠寞嚗舀賢典祈賢停瘥頛撌桃蝖祇啣銋銝嚗憭憯璁典箔鈭霈賬8 \; C, Z0 w8 S# s$ F
撖虫:隞亙鈕erver敺憭撌乩,靘憒 ffmpeg, php(move_uploaded_file)銝喳之瑼獢 ,tar , mv 憭抒瑼獢,雿撟曆∩,摰典銝鈭,蝬銝餈啁隤踵,憿摰刻圾瘙
5 l1 C6 o/ Y" y1 h/ A' ^ }4 ^! K1 U+ M3 A
血,sysctl.conf隤踵銋舀撟怠拍
! N* j, Q8 |8 N9 Y0 |8 k J+ ]; M: r- K
7 `5 d2 t6 s7 g( L. A靘皞:- }- a1 p) a8 i J# \
$ Q ]& u& t" {5 ?
http://itstorage.storageforum.tw ... eadahead-cache.html
5 n8 @1 |' v! m. P R$ ^) M |
|