I. 介紹 :
這個東西主要是增進系統在讀寫時候的I/O效能
在Linux上的Scheduler :
1. Noop I/O scheduler: 簡單排程器, 就先到先執行.
2. Anticipatory I/O scheduler: 預測排程器, 會預測下一個IO而調整順序, 據說也不錯, 但演算法複雜, 大量IO時就不是那麼好了.
3. Deadline I/O scheduler: 會紀錄程式的Deadline, 是2.6版核心才引進的, 效果非常不錯.
4. CFQ I/O scheduler: 預設, 儘可能公平的排程器, 適用於桌面程式應用 , 有些許bug(亂吃記憶體) 詳細內容請google
from : 資料來源
II. 說明 :
在Linux上面預設是CFQ Scheduler 包含Android手機也是
這個排程對於手機上 會損失不少效能 這比較適合用於傳統硬碟
在Flash memory上面 比較適合用Deadline Scheduler
這個可以增強不少系統在處理I/O要求上的效能 也不會讓系統亂吃記憶體
III. 修改 :
那如何修改Scheduler呢?
有兩個方法:
1. 使用Market上的OCLF裡面有個可以修改Scheduler的選項
2. <小心使用> 使用 Voltage Control - control OC/UV 不過這方法比較適合OC kernel的人
XI. 額外補充 :
目前這陣子還有一個新出的BFQ Scheduler 在現在的Kernel都有引用
Super kernel系列
Speed MOD kernel 系列
所以在部份人刷Speed MOD kernel之後 也因為這個Scheduler的關係之一
所以達到可以和OC差不多的效能
X. 結論 :
大部分人都是使用了其他家 kernel 所以都有了BFQ
那我這篇主要是給一些不想刷kernel的人 但是你可以透過Schduler修改達到效能提昇
對排程有興趣的人可以去修資工的real time operating system課程
裡面有非常多的排程演算法可以學

一般的OS課程不會介紹太多詳細的schedule方法
但對RTOS來說,排程幾乎就是一切

不過手機上的BFQ和linux上的BFS有一樣嗎@@?
BFQ 簡介
BFQ是針對I/O的 BFS是針對CPU的
這點我不太懂...需要指教一下OTZ
不過BFQ這是這一陣子XDA才寫到Android手機上的 Desire沒記錯也有ROM是用這個
所以之前跑Deadline也不見怪阿XD 別太在意..
# Remount all partitions with noatime
atime is a setting where the filesystem updates the access time of a file. This creates a write-after-every-read which slows things down. By default all partitions are mounted with relatime, which is an optimized version of atime. noatime is the fastest, and afaik we don't need atime.
# Tweak cfq io scheduler
Tweaked settings of the disk io scheduler more for flash memory. Defaults are optimized for spinning harddisks. Lowered the idle wait, re-enable the low latency mode of cfq, removed the penalty for back-seeks and explicitly tell the kernel the storage is not a spinning disk.
# Tweak kernel VM management
Set tendency of kernel to swap to minimum, since we don't use swap anyway.
Lower the amount of unwritten write cache to reduce lags when a huge write is required.
Increase tendency of kernel to keep block-cache to help with slower RFS filesystem.
Increase minimum free memory, in theory this should make the kernel less likely to suddenly run out of memory.
# Tweak kernel scheduler
Make the task scheduler more 'fair' when multiple tasks are running. This has a huge effect on UI and App responsiveness. These values (less aggressive settings) are 20% of the Linux defaults, and about half of the Android defaults.
# Miscellaneous tweaks
Manually set the starting dalvik heap size.
(MISC TWEAK IS CHANGED IN THE LATEST VERSIONS OF HARDCORE'S KERNEL. CHECK HIS THREAD FOR CHANGELOG.)
要使用某一個優化只需要進入recovery , advanced CMW options
不過這些都是更進階的優化,使用前要清楚每種優化是做什麼
沒有不好的手機,只有你是否適應它.
內文搜尋
X


























































































