Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
farmatito
Old
#1  
Senior Member - OP
Thanks Meter 119
Posts: 544
Join Date: Apr 2009
Default Speed up your system with the noop scheduler

From Wikipedia:
Code:
The NOOP scheduler is the simplest I/O scheduler for the Linux kernel.
This scheduler was developed by Jens Axboe.

The NOOP scheduler inserts all incoming I/O requests into a simple, unordered
FIFO queue and implements request merging.

The scheduler assumes I/O performance optimization will be handled at some 
other layer of the I/O hierarchy; e.g., at the block device; by an intelligent
HBA such as a Serial Attached SCSI (SAS) RAID controller or by an externally
attached controller such as a storage subsystem accessed through a 
switched Storage Area Network).

NOOP scheduler is best used with solid state devices such as flash memory
or in general with devices that do not depend on mechanical movement to
access data (meaning typical "hard disk" drive technology consisting of seek
time primarily, plus rotational latency). Such non-mechanical devices do not
require re-ordering of multiple I/O requests, a technique that groups together
I/O requests that are physically close together on the disk, thereby reducing
average seek time and the variability of I/O service time.
To check which scheduler is used:

Code:
 adb shell
~ # cat /sys/block/mmcblk0/queue/scheduler
[noop] cfq
To select a different scheduler:

Code:
adb shell
~ # echo "noop" > /sys/block/mmcblk0/queue/scheduler

To select the noop scheduler for all your block devices you can add
this lines to your userinit.sh script:

Code:
# Set "No-op" scheduler for mtdblocks and mmc
for i in `ls -1 /sys/block/mtdblock*` /sys/block/mmcblk0
do
	echo "noop" > $i/queue/scheduler
done
I tested it a little and especially the sdcard seems to work faster.

Enjoy
The Following 2 Users Say Thank You to farmatito For This Useful Post: [ Click to Expand ]
 
akirah
Old
#2  
Senior Member
Thanks Meter 4
Posts: 231
Join Date: Aug 2007
Location: Seattle / Warsaw
Ahh, noop is set to default in my kernels, but I wouldn't say that there is BIG difference on g1.
The Following User Says Thank You to akirah For This Useful Post: [ Click to Expand ]
 
JD82
Old
(Last edited by JD82; 24th October 2009 at 11:01 PM.)
#3  
JD82's Avatar
Senior Member
Thanks Meter 57
Posts: 154
Join Date: Feb 2009
Is it even better then the BFQ Scheduler used by Cyanogen?
Smartphone: Galaxy Nexus GSM (i9250)
Firmware: Latest CyanogenMod
Recovery: Clockwork Recovery
 
pentace
Old
#4  
Senior Member
Thanks Meter 0
Posts: 402
Join Date: Oct 2006
Quote:
Originally Posted by farmatito View Post
From Wikipedia:
Code:
The NOOP scheduler is the simplest I/O scheduler for the Linux kernel.
This scheduler was developed by Jens Axboe.

The NOOP scheduler inserts all incoming I/O requests into a simple, unordered
FIFO queue and implements request merging.

The scheduler assumes I/O performance optimization will be handled at some 
other layer of the I/O hierarchy; e.g., at the block device; by an intelligent
HBA such as a Serial Attached SCSI (SAS) RAID controller or by an externally
attached controller such as a storage subsystem accessed through a 
switched Storage Area Network).

NOOP scheduler is best used with solid state devices such as flash memory
or in general with devices that do not depend on mechanical movement to
access data (meaning typical "hard disk" drive technology consisting of seek
time primarily, plus rotational latency). Such non-mechanical devices do not
require re-ordering of multiple I/O requests, a technique that groups together
I/O requests that are physically close together on the disk, thereby reducing
average seek time and the variability of I/O service time.
To check which scheduler is used:

Code:
 adb shell
~ # cat /sys/block/mmcblk0/queue/scheduler
[noop] cfq
To select a different scheduler:

Code:
adb shell
~ # echo "noop" > /sys/block/mmcblk0/queue/scheduler

To select the noop scheduler for all your block devices you can add
this lines to your userinit.sh script:

Code:
# Set "No-op" scheduler for mtdblocks and mmc
for i in `ls -1 /sys/block/mtdblock*` /sys/block/mmcblk0
do
	echo "noop" > $i/queue/scheduler
done
I tested it a little and especially the sdcard seems to work faster.

Enjoy

Would you mind since you are willing to share this info to post some information on what settings you are finding work best and such?

To post this type of info without it being watered down a bit for ever level of user can and probably will cause issues from people going into settings only half knowing what they are doing. Granted if you don't know what you are doing you shouldn't be, but we all know its going to happen
__________________
Protocol - X
=================
Phone: Nexus One & Black TMO G1 Rooted
ROM: CM 6 Nightly
File Browser: SUFBS
Twitter: Protocol_X
 
farmatito
Old
#5  
Senior Member - OP
Thanks Meter 119
Posts: 544
Join Date: Apr 2009
Quote:
Originally Posted by pentace View Post
Would you mind since you are willing to share this info to post some information on what settings you are finding work best and such?

To post this type of info without it being watered down a bit for ever level of user can and probably will cause issues from people going into settings only half knowing what they are doing. Granted if you don't know what you are doing you shouldn't be, but we all know its going to happen
I tested it on a Cyanogen Mod 4.0.4 with self compiled kernel 2.6.29.6
from cyanogen's git repository. The available schedulers are noop and cfq.
The default scheduler was cfq and after having read about noop scheduler
i tried it and found no regression in performance but rather some improvement.
I have no benchmarks yet. So you have to test it yourself
to see if it makes a difference on your phone. I cannot imagine
this mod causing issues as it is easily reverted and it was not intended
for all users but rather for the tech savvy to see if they can confirm
some improvement in performance.
 
akirah
Old
#6  
Senior Member
Thanks Meter 4
Posts: 231
Join Date: Aug 2007
Location: Seattle / Warsaw
Quote:
Originally Posted by JD82 View Post
Is it even better then the BFC Scheduler used by Cyanogen?
It's I/O scheduler.
 
JD82
Old
(Last edited by JD82; 24th October 2009 at 11:18 PM.)
#7  
JD82's Avatar
Senior Member
Thanks Meter 57
Posts: 154
Join Date: Feb 2009
Quote:
Originally Posted by akirah View Post
It's I/O scheduler.
I've made a typo: it is BFQ, not BFC.

From the cyanogenmod's changelog:
Quote:
* Now using the BFQ I/O scheduler, which seems like a good compromise between CFQ and the old anticipatory scheduler
From my G1:
Code:
adb shell
# cat /sys/block/mmcblk0/queue/scheduler
noop [bfq]
Again: Is it even better then the BFQ Scheduler used by Cyanogen?
Smartphone: Galaxy Nexus GSM (i9250)
Firmware: Latest CyanogenMod
Recovery: Clockwork Recovery
 
shafty023
Old
#8  
Senior Member
Thanks Meter 73
Posts: 1,096
Join Date: Jul 2007
Location: Austin,TX
Quote:
Originally Posted by farmatito View Post
From Wikipedia:
Code:
The NOOP scheduler is the simplest I/O scheduler for the Linux kernel.
This scheduler was developed by Jens Axboe.

The NOOP scheduler inserts all incoming I/O requests into a simple, unordered
FIFO queue and implements request merging.

The scheduler assumes I/O performance optimization will be handled at some 
other layer of the I/O hierarchy; e.g., at the block device; by an intelligent
HBA such as a Serial Attached SCSI (SAS) RAID controller or by an externally
attached controller such as a storage subsystem accessed through a 
switched Storage Area Network).

NOOP scheduler is best used with solid state devices such as flash memory
or in general with devices that do not depend on mechanical movement to
access data (meaning typical "hard disk" drive technology consisting of seek
time primarily, plus rotational latency). Such non-mechanical devices do not
require re-ordering of multiple I/O requests, a technique that groups together
I/O requests that are physically close together on the disk, thereby reducing
average seek time and the variability of I/O service time.
To check which scheduler is used:

Code:
 adb shell
~ # cat /sys/block/mmcblk0/queue/scheduler
[noop] cfq
To select a different scheduler:

Code:
adb shell
~ # echo "noop" > /sys/block/mmcblk0/queue/scheduler

To select the noop scheduler for all your block devices you can add
this lines to your userinit.sh script:

Code:
# Set "No-op" scheduler for mtdblocks and mmc
for i in `ls -1 /sys/block/mtdblock*` /sys/block/mmcblk0
do
	echo "noop" > $i/queue/scheduler
done
I tested it a little and especially the sdcard seems to work faster.

Enjoy
Excellent tip, thanks!
My Qualifications
Bachelors Degree in Computer Science
Software Engineer
Java/Java EE 5/Java EE 6/C/C++/Intel Assembly/Lisp/PHP/JSP/Javascript/HTML/JQuery/AJAX/JSON/XML/CSS

App I developed
Enhanced Email for Android

Contact Me
Twitter
Google+
 
Afirejar
Old
#9  
Member
Thanks Meter 0
Posts: 89
Join Date: Aug 2009
Quote:
Originally Posted by JD82 View Post
I've made a typo: it is BFQ, not BFC.

From the cyanogenmod's changelog:
From my G1:
Code:
adb shell
# cat /sys/block/mmcblk0/queue/scheduler
noop [bfq]
Again: Is it even better then the BFQ Scheduler used by Cyanogen?
Yeah well, anticipatory is back now in the new stable build.
Code:
cat /sys/block/mmcblk0/queue/scheduler
noop [anticipatory]
Cyanogen 5.0.7 - AmonRa Recovery 1.6.2 - DangerSPL - G1
 
farmatito
Old
#10  
Senior Member - OP
Thanks Meter 119
Posts: 544
Join Date: Apr 2009
I tested it only vs cfq scheduler, so I can't say if it is better than anticipatory
or cfq scheduler. The rationale behind this change is that flash and mmc don't need a scheduler so there should be a performance gain for the reason that
that we use simpler/less kernel code with littler data structures in memory.
Time and user reports will tell it the change is worth the effort.

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Flash Custom ROM and Recovery to Samsung Galaxy S 4

After reading about Dan Rosenberg’s bootloader exploit for the Samsung Galaxy S 4,I … more

Windows-Based Multi-Tool for the Sony Xperia U

If you are a flashaholic and an owner of the Sony Xperia U, you may be interested in the … more

XDA University: Crafting Recovery-Flashable Packages

Those of us who use Linux on a day to day basis don’t think twice about sinking … more