What does noop cfq and deadline mean in setcpu - HTC Sensation

Ok so i read this post but I don't understand any of it. Can someone explain it to me simple. All I know is noop the one I'm using now seems to not max out to 1512 as much as the other ones so maybe it will be better one battery life.
http://forum.xda-developers.com/showthread.php?t=1558153
Sent from my HTC Sensation 4G using xda premium

iverson3-1 said:
Ok so i read this post but I don't understand any of it. Can someone explain it to me simple. All I know is noop the one I'm using now seems to not max out to 1512 as much as the other ones so maybe it will be better one battery life.
http://forum.xda-developers.com/showthread.php?t=1558153
Sent from my HTC Sensation 4G using xda premium
Click to expand...
Click to collapse
Hey,
To the best of my understanding, they are I/O schedulers based on certain algorithms.
It's easy to explain if you know how queues are implemented.
noop is just a First In First Out standard queue of I/O operations.
cfq (Completely Fair Scheduling) is similar to the Round Robin algorithm and basically allots a fixed execution time for each I/O operation (they are implemented as a circular queue)
deadline is like a priority queue with an aging concept. Basically it adds a dealine for each I/O operation & implements a priority queue
Furthermore, there are 2 queues, one for read & one for write operations.
I'm sorry if this doesn't make sense, you just asked a technical question & I don't know how to explain better than this!
EDIT: Okay, I didn't see the link, most of the info I gave is present there.
EDIT: Here's an analogy, if people were queuing up to buy ice cream:
noop would implement the first come first serve rule.
cfq would let each person to buy one ice cream at a time & go back to the end of the queue if he wants another.
deadline would keep a separate queue for certain people (like older people & people who have been waiting for too long; somewhat setting a priority) & would serve the separate queue first.
Tried my best.

kgs1992 said:
Hey,
To the best of my understanding, they are I/O schedulers based on certain algorithms.
It's easy to explain if you know how queues are implemented.
noop is just a First In First Out standard queue of I/O operations.
cfq (Completely Fair Scheduling) is similar to the Round Robin algorithm and basically allots a fixed execution time for each I/O operation (they are implemented as a circular queue)
deadline is like a priority queue with an aging concept. Basically it adds a dealine for each I/O operation & implements a priority queue
Furthermore, there are 2 queues, one for read & one for write operations.
I'm sorry if this doesn't make sense, you just asked a technical question & I don't know how to explain better than this!
EDIT: Okay, I didn't see the link, most of the info I gave is present there.
EDIT: Here's an analogy, if people were queuing up to buy ice cream:
noop would implement the first come first serve rule.
cfq would let each person to buy one ice cream at a time & go back to the end of the queue if he wants another.
deadline would keep a separate queue for certain people (like older people & people who have been waiting for too long) & would serve the separate queue first.
Tried my best.
Click to expand...
Click to collapse
Thanks. Nice analogy. I understand a lil better now.
Sent from my HTC Sensation 4G using xda premium

which would be best for general use of our dual core sensation?
i was told that dualcore doesnt work that well with all schedulers

What is better
What is best to use for performance , Cfq , noop Or deadline?

Envious_Data said:
What is best to use for performance , Cfq , noop Or deadline?
Click to expand...
Click to collapse
i am using cfq and i can say that performance is very good

I don't have that many apps running, so cfq seems to work best for me.

i use xondemand most of the time, sometimes ondemand or intellidemand depending on kernel. those cpu govs works best with sio scheduler, imo.

i have no idea which is the best applicable to htc sensation even after the brilliant explanation by the TS.
i guess i can never tell which is the best. I was using cfq all along which brick kernel (because it was set as default)
After flashing a newer version of ViperS 1.4.0, the default became nooq for some reasons i do not know, i guess i will just give it a try.

egg_n_ham said:
i have no idea which is the best applicable to htc sensation even after the brilliant explanation by the TS.
i guess i can never tell which is the best. I was using cfq all along which brick kernel (because it was set as default)
After flashing a newer version of ViperS 1.4.0, the default became nooq for some reasons i do not know, i guess i will just give it a try.
Click to expand...
Click to collapse
you can change it by using setcpu or system tuner or
it can be done in system>etc>init.qcom.post_boot.sh by editing with any file manager(maybe i am wrong with this one)

I have tried many scheduler and governor settings but i always endup with DEADLINE as I/O scheduler and ONDEMAND as CPU governor!
Just give it a try! :good:

kgs1992 said:
Hey,
To the best of my understanding, they are I/O schedulers based on certain algorithms.
It's easy to explain if you know how queues are implemented.
noop is just a First In First Out standard queue of I/O operations.
cfq (Completely Fair Scheduling) is similar to the Round Robin algorithm and basically allots a fixed execution time for each I/O operation (they are implemented as a circular queue)
deadline is like a priority queue with an aging concept. Basically it adds a dealine for each I/O operation & implements a priority queue
Furthermore, there are 2 queues, one for read & one for write operations.
I'm sorry if this doesn't make sense, you just asked a technical question & I don't know how to explain better than this!
EDIT: Okay, I didn't see the link, most of the info I gave is present there.
EDIT: Here's an analogy, if people were queuing up to buy ice cream:
noop would implement the first come first serve rule.
cfq would let each person to buy one ice cream at a time & go back to the end of the queue if he wants another.
deadline would keep a separate queue for certain people (like older people & people who have been waiting for too long; somewhat setting a priority) & would serve the separate queue first.
Tried my best.
Click to expand...
Click to collapse
Explain a new scheduler that is row which is available now in set cpu. And if u could explain governor also plz go ahead . i would be very thankful!

kgs1992 said:
Hey,
To the best of my understanding, they are I/O schedulers based on certain algorithms.
It's easy to explain if you know how queues are implemented.
noop is just a First In First Out standard queue of I/O operations.
cfq (Completely Fair Scheduling) is similar to the Round Robin algorithm and basically allots a fixed execution time for each I/O operation (they are implemented as a circular queue)
deadline is like a priority queue with an aging concept. Basically it adds a dealine for each I/O operation & implements a priority queue
Furthermore, there are 2 queues, one for read & one for write operations.
I'm sorry if this doesn't make sense, you just asked a technical question & I don't know how to explain better than this!
EDIT: Okay, I didn't see the link, most of the info I gave is present there.
EDIT: Here's an analogy, if people were queuing up to buy ice cream:
noop would implement the first come first serve rule.
cfq would let each person to buy one ice cream at a time & go back to the end of the queue if he wants another.
deadline would keep a separate queue for certain people (like older people & people who have been waiting for too long; somewhat setting a priority) & would serve the separate queue first.
Tried my best.
Click to expand...
Click to collapse
Great way explain .. Terrific

Related

Can someone explain I/O Schedulers?

Well with the release of Imnuts' awesome new kernel I'm finally back to messing around with clocks/volts. I seriously haven't touched Voltage Control since EP1W was released months ago, and even then I only overclocked and undervolted, I never messed with the I/O Schedulers or the CPU Governors. I've decided to use Smartass V2 as the Governor since Imoseyon explained what all the different governors did and that one seems to suit me the best, but as for I/O Schedulers I'm still pretty baffled.
So basically I'm asking if one of you nice XDA users could explain what I/O Schedulers are and what your personal favorite is.
For flash based memory, all IO Schedulers work roughly the same as far as how fast they work. You won't see much of any difference between any of them for 95% of what you do most likely. There is a thread here on XDA in the Nexus One section where someone (or a few people) setup a simple benchmark to test the read/write speed of a few different schedulers and they were all the same, or close enough that it wasn't significant.
blarrick said:
So basically I'm asking if one of you nice XDA users could explain what I/O Schedulers are and what your personal favorite is.
Click to expand...
Click to collapse
To answer the "what they are" question...
They are the rules that the OS uses to determine what order to execute reads and writes to and from block storage (HDD or flash). The primary goal of the majority of them is to find ways to group operations in such a way as to minimize the effect of the seek time on a rotating physical disk, such as an HDD. Different schedulers have different ways of deciding, but, as imnuts said, they'll make very little difference on flash, as flash doesn't have the limitations of a spinning disk, and thus, don't have the problem that I/O schedulers are meant to solve. Certain types of operations or certain individual operations may benefit from one over another in the short term, but over the long run, the total time to complete a larger set of operations on flash should shake out to be roughly the same regardless of the scheduler used.
This thread has a lot of info, scheduler info is in post #3:
http://forum.xda-developers.com/showthread.php?t=1369817

Which one is the better I/O setting?

Is it bfq or cfq?
And should I choose performance over conservative in voltage control?
I always got kernel panic when I undervolted, too.
Sent from my Saurom'd Infuse
I always left my infuse CPU/voltage at stock settings....never had any probs and the phone was fast enough and lasted me the day...not that is helpful for you question...but if I were you I wouldnt mess with CPU and voltage...but that's just me
Sent from my HTC PH39100 using Tapatalk 2
Crinkypops said:
Is it bfq or cfq?
And should I choose performance over conservative in voltage control?
I always got kernel panic when I undervolted, too.
Sent from my Saurom'd Infuse
Click to expand...
Click to collapse
I have been using cfq with ondemand, and undervolt 50 mV each not much but its stable. Performance setting will kill your battery.
I was under the impression that noop is theoretically the best I/O scheduler for flash devices, but I can't find any good benchmarks comparing its performance to the others in a typical real world smartphone workload.
Btw I don't consider using "time dd" to be very helpful in replicating a real world multitasking workload. What's the point of testing a scheduler with a single file read or write? You may or may not have background processes reading or writing at the time of the test, but you wouldn't necessarily know it. As such, I would take any single threaded I/O benchmarks or simple tests with a grain of salt, even on a smartphone.
If someone with more knowledge of smartphone I/O access patterns sees a need to correct me on this, I would appreciate it. I'm an experienced *nix admin, but pretty much still a noob regarding android.
Sent from my SGH-I997 using xda app-developers app

[Q] Governors & I/O schedulers?

Please forgive me for asking, if this has already been answered. Question for the Devs... Will any future releases (kernel only, or ROM) include a wider selection of governors and i/o schedulers, or is this device limited to the ones already available for some reason?
Coming over from HTC Glacier and Doubleshot, there were more choices than I knew what to do with. This is my first Samsung device.
Not that I'm complaining, I've found a combination that works good for me. I just wanted to know.
By the way - you guys are doing some great work over here. I'm loving this phone. Thanks!
This would be done on the kernel level and it is certainly possible to add more options but doing so can make things less stable.
If there is something you think may work better you could ask a dev if implementing has been tried and what the result is otherwise the main kernel source is available on github and there are many guides to build yourself and test
Sent from my Nexus 4 using XDA Premium 4 mobile app
demkantor said:
This would be done on the kernel level and it is certainly possible to add more options but doing so can make things less stable.
If there is something you think may work better you could ask a dev if implementing has been tried and what the result is otherwise the main kernel source is available on github and there are many guides to build yourself and test
Sent from my Nexus 4 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I'm sure the devs have sound reasoning behind their choices. I was just curious to find out if it was something device specific, as opposed to dev preference. I don't know that I would go so far, as to tamper with the kernel source myself. I don't have those skills yet. I may look into that in the future. I'm always willing to learn.
jadrt09 said:
Please forgive me for asking, if this has already been answered. Question for the Devs... Will any future releases (kernel only, or ROM) include a wider selection of governors and i/o schedulers, or is this device limited to the ones already available for some reason?
Coming over from HTC Glacier and Doubleshot, there were more choices than I knew what to do with. This is my first Samsung device.
Not that I'm complaining, I've found a combination that works good for me. I just wanted to know.
By the way - you guys are doing some great work over here. I'm loving this phone. Thanks!
Click to expand...
Click to collapse
Hit the app store and grab CPU Tuner, you might find it's got what you need.
yohan4ws said:
Hit the app store and grab CPU Tuner, you might find it's got what you need.
Click to expand...
Click to collapse
Thanks, I'll check that one out but I believe that apps like that will only allow you to select from the governors and schedulers that are available in the kernel itself - not implement one that isn't there. I'd like to try out intellidemand, or smartassV2 with this device.
Right now, I'm using the interactive governor & sio. Then using SetCPU with profiles for screen-off, screen-on, and charging. This is kind of giving me the results I wanted. Sort of gives me an interactiveX, I guess? SetCPU doesn't show me both cores, so I really don't know. Also have tried Kernel Tuner and Trickster with mixed results.
jadrt09 said:
Thanks, I'll check that one out but I believe that apps like that will only allow you to select from the governors and schedulers that are available in the kernel itself - not implement one that isn't there. I'd like to try out intellidemand, or smartassV2 with this device.
Right now, I'm using the interactive governor & sio. Then using SetCPU with profiles for screen-off, screen-on, and charging. This is kind of giving me the results I wanted. Sort of gives me an interactiveX, I guess? SetCPU doesn't show me both cores, so I really don't know. Also have tried Kernel Tuner and Trickster with mixed results.
Click to expand...
Click to collapse
Just downloaded CPU Tuner. This appears to be a better alternative to the other ones I've tried. I can get what I want without trying to mess with the kernel. Gonna run the "Sophisticated" config + Performance profile for a while and see how it goes. Thanks! :good:
jadrt09 said:
Please forgive me for asking, if this has already been answered. Question for the Devs... Will any future releases (kernel only, or ROM) include a wider selection of governors and i/o schedulers, or is this device limited to the ones already available for some reason?
Coming over from HTC Glacier and Doubleshot, there were more choices than I knew what to do with. This is my first Samsung device.
Not that I'm complaining, I've found a combination that works good for me. I just wanted to know.
By the way - you guys are doing some great work over here. I'm loving this phone. Thanks!
Click to expand...
Click to collapse
my roms have more freedom of the kernel with this...current governors in my builds are: conservative, ondemand, userspace, powersave, interactive, and performance. Current I/O schedulers are noop, deadline, row, cfq, and sio. i will be exapanding on this soon but sio and interactive or sio and ondemand have given the bast stability for me.
REV3NT3CH said:
my roms have more freedom of the kernel with this...current governors in my builds are: conservative, ondemand, userspace, powersave, interactive, and performance. Current I/O schedulers are noop, deadline, row, cfq, and sio. i will be exapanding on this soon but sio and interactive or sio and ondemand have given the bast stability for me.
Click to expand...
Click to collapse
I've been running your Carbon ROM for a little while and I've been pretty pleased with it. I've settled on the interactive and sio combination but I wanted to have a little more control. Most of the time I just text and do a little web browsing, so I want to extend battery life. But I have access to a lot of wi-fi hotspots, so then I can plug in for some gaming or Netflix. It's nice to have the performance amped up then. I seemed to have good results with intellidemand and smartass variations on my other phones.
I appreciate your work, thanks!
jadrt09 said:
I've been running your Carbon ROM for a little while and I've been pretty pleased with it. I've settled on the interactive and sio combination but I wanted to have a little more control. Most of the time I just text and do a little web browsing, so I want to extend battery life. But I have access to a lot of wi-fi hotspots, so then I can plug in for some gaming or Netflix. It's nice to have the performance amped up then. I seemed to have good results with intellidemand and smartass variations on my other phones.
I appreciate your work, thanks!
Click to expand...
Click to collapse
your very welcome...as ive stated before i will be adding some more here soon. i have a couple of new rom builds im working on and an update to another...i definitely need to work on the kernel as ive done little patches here and there but nothing too big....think within the next few weeks ill do a big update to it and update all my roms with it
Perhaps you could release a flashable kernel for people on cm?
Sent from my SGH-T699 using Tapatalk
REV3NT3CH said:
my roms have more freedom of the kernel with this...current governors in my builds are: conservative, ondemand, userspace, powersave, interactive, and performance. Current I/O schedulers are noop, deadline, row, cfq, and sio. i will be exapanding on this soon but sio and interactive or sio and ondemand have given the bast stability for me.
Click to expand...
Click to collapse
Errr What advantages are there from sio over the other i/o schedulers. That's the only addition between your list and what we are currently enabling.
Magamo said:
Errr What advantages are there from sio over the other i/o schedulers. That's the only addition between your list and what we are currently enabling.
Click to expand...
Click to collapse
Simple I/O (sio) scheduler aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority quesues concepts, but only basic merging. Sio is a mix between noop & deadline. No reordering or sorting of requests.
REV3NT3CH said:
Simple I/O (sio) scheduler aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority quesues concepts, but only basic merging. Sio is a mix between noop & deadline. No reordering or sorting of requests.
Click to expand...
Click to collapse
I notice a difference in performance when I change governors but I can't say that I notice a difference at all, when changing i/o schedulers. My understanding is that certain combinations are supposed to work better together. I just remember that devs of certain mods I've used had a preference for sio o over the others. Not sure why, but it worked, so I've stuck with it...

[Q] New governors & schedulers?

There are a few governors and i/o schedulers that I have never seen before and after searching, I haven't really come up with any good information. If someone with more knowledge than I would be willing to point me in the right direction, I would appreciate the help. Or, perhaps posting a brief explanation would be beneficial to all?
Here is a list of the ones I'm unsure about:
Governors; darkness, intelliactive, dancedance, smartmax, uberdemand
Schedulers; vr, fiops, tripndroid, zen
Does anyone have any suggested uses, or combinations for these?
Google will give you a great explanation on these governors...personally Zen and sio are great with battery
Sent from my SPH-L710 using XDA Premium 4 mobile app
I use Wheatley and zen, works perfectly and a great battery performance
Sent from my SGH-T699 using XDA Premium 4 mobile app
REV3NT3CH said:
Google will give you a great explanation on these governors...personally Zen and sio are great with battery
Sent from my SPH-L710 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Naturally, I tried to search Google and the forums first. Seems like I keep coming across outdated material that doesn't explain much on the ones I listed. I'm already pretty happy using a set-up I'm familiar with - this was really more for educational purposes. I'm always wondering if I can tweak a little something and get better results.
This is the list I come across most often...
http://forum.xda-developers.com/nexus-4/development/guide-android-governors-explained-t2017715
Player-J said:
Naturally, I tried to search Google and the forums first. Seems like I keep coming across outdated material that doesn't explain much on the ones I listed. I'm already pretty happy using a set-up I'm familiar with - this was really more for educational purposes. I'm always wondering if I can tweak a little something and get better results.
This is the list I come across most often...
http://forum.xda-developers.com/nexus-4/development/guide-android-governors-explained-t2017715
Click to expand...
Click to collapse
I've been trying to find some results on the same governors but found very little. I've even done more than google but no luck. Anyway I will probably experiment a little and not worry about it.
Hello,
I have the possibility to choose the governor "optimax". So I have search at google about information of this governor. But I didn't found an explaination or other information. Can anybody help me? What are the differents to the other (default) Governors? Thanks.
Player-J said:
There are a few governors and i/o schedulers that I have never seen before and after searching, I haven't really come up with any good information. If someone with more knowledge than I would be willing to point me in the right direction, I would appreciate the help. Or, perhaps posting a brief explanation would be beneficial to all?
Here is a list of the ones I'm unsure about:
Governors; darkness, intelliactive, dancedance, smartmax, uberdemand
Schedulers; vr, fiops, tripndroid, zen
Does anyone have any suggested uses, or combinations for these?
Click to expand...
Click to collapse
I know darkness is a modified nightmare governor for stability and battery life, and nightmare is a modified pegasusq governor that tries to save battery by not scaling as aggressively and improving stability, it also doesn't hotplug as readily as pegasusq from what I understood.
Also intelliactive is a modified interactive by faux with the following modifications :
"1. self-boost capability from input drivers (no need for PowerHAL assist)
2. two phase scheduling (idle/busy phases to prevent from jumping directly to max freq
3. Checks for offline cpus and short circuits some unnecessary checks to improve code execution paths"
Dance Dance is a unique governor modified for performance but based on conservative. DD Provides a nice blend of performance and efficient battery life.
Uberdemand is Ondemand and with 2-phase feature meaning it has a soft cap at 1728 MHz so your cpu won't always go directly to max, made by Chet Kener.
Smartmax is a new governor which is a mix between ondemand and smartass2 By default this is configured for battery save.
Hope this helps!

[Q] Schedulers

Hi and forgive my 'noobness' but do you guys think there's a significal difference in performance/battery if I use a different scheduler, because I googled a lot about the differences between all of them and I actually understand what all they do and their main advantages. Some people say that ROW feels quicker than deadline but Im not sure if its placebo. A guy in andrux-and-me(dot)blogspot(dot)com(dot)es/2014/05/io-schedulers-and-performance-2(dot)html compared/tested them so that's why I was wondering.
I always use the default scheduler in ElementalX (ROW I think) and never had any troubles but I also believe that Franco uses deadline so I was wondering what the experts here have to say.
Difference isn't too noticeable for most.
DamnItLukasz said:
Hi and forgive my 'noobness' but do you guys think there's a significal difference in performance/battery if I use a different scheduler, because I googled a lot about the differences between all of them and I actually understand what all they do and their main advantages. Some people say that ROW feels quicker than deadline but Im not sure if its placebo. A guy in andrux-and-me(dot)blogspot(dot)com(dot)es/2014/05/io-schedulers-and-performance-2(dot)html compared/tested them so that's why I was wondering.
I always use the default scheduler in ElementalX (ROW I think) and never had any troubles but I also believe that Franco uses deadline so I was wondering what the experts here have to say.
Click to expand...
Click to collapse
I've done benchmarks with some schedulers at different buffer sizes, and other users have done way more extensive testing.
it is heavily device dependent and benchmarking does not exactly reflect real-life usage.
your best bet is to find one that works for you.
my two most common are row and fiops at 512 or 1024 buffer.
it all depends how personally you use your device. how you use it would show you which one to use. i use only deadline. it works perfectly for how i use my device.

Categories

Resources