if i admit CFQ and Deadline won't change performance on a high end laptop with standards tasks (i can be wrong), then is there a consumption gain using Deadline, or not ?
This is the reason why I ended up going back to cfq. I spent some time trying other schedulers, and for the most part, I couldn't tell much of a difference. In fact, I wrote that section on how to set the sceduler using a udev rule.
CFQ works perfectly fine, and since it is SSD aware and it allows use of ionice, it is the best choice in my opinion.
I will admit though that it was fun to learn how to use udev to change settings in response to different hardware attributres. So although I ended up back at the default, I still gained something from that experimentation.
CFQ places synchronous requests submitted by processes into a number of per-process queues and then allocates timeslices for each of the queues to access the disk. The length of the time slice and the number of requests a queue is allowed to submit depends on the I/O priority of the given process. Asynchronous requests for all processes are batched together in fewer queues, one per priority. While CFQ does not do explicit anticipatory I/O scheduling, it achieves the same effect of having good aggregate throughput for the system as a whole, by allowing a process queue to idle at the end of synchronous I/O thereby "anticipating" further close I/O from that process. It can be considered a natural extension of granting I/O time slices to a process.
Deadline
The main goal of the Deadline scheduler is to guarantee a start service time for a request.[1] It does so by imposing a deadline on all I/O operations to prevent starvation of requests. It also maintains two deadline queues, in addition to the sorted queues (both read and write). Deadline queues are basically sorted by their deadline (the expiration time), while the sorted queues are sorted by the sector number.
Before serving the next request, the deadline scheduler decides which queue to use. Read queues are given a higher priority, because processes usually block on read operations. Next, the deadline scheduler checks if the first request in the deadline queue has expired. Otherwise, the scheduler serves a batch of requests from the sorted queue. In both cases, the scheduler also serves a batch of requests following the chosen request in the sorted queue.
Noop
The NOOP scheduler inserts all incoming I/O requests into a simple FIFO queue and implements request merging. This scheduler is useful when it has been determined that the host should not attempt to re-order requests based on the sector numbers contained therein. In other words, the scheduler assumes that the host is definitionally unaware of how to productively re-order requests.
TL;DR : seems deadline is good for databases and noop for SSD but noop make issues on others process when copying a big file for exemple. Wich one should i use with a SSD: CFQ, deadline or Noop ?
With a high end laptop, do you think it would make a difference ? I always wonder before make deep changes on my config because i prefer let it run on vanilla mode if ther's no real improvement.
Hardware alone probably shouldn't dictate your scheduler choice. It heavily depends on the workload you're processing. noop might be a sensible default since it reduces overhead while the ssd can make unordered requests no big deal, but cfq and deadline can still be just as applicable as before.
seems deadline is good for databases
It depends on what the database is. deadline is hugely skewed towards reads (by default but it can be configured to be biased towards writes). This works well if it's heavy on reads and writing is a relatively exceptional event (like an LDAP directory or a web server's DocumentRoot).
If the DB is heavy on synchronous writes then it could be a worse choice. At the end of the day deadline is about latency guarantees so it may or may not be beneficial to a DBMS that reads a lot of DB/table info into memory.
Of course there's only three options you're interested in. You can install something that monitors disk I/O stats and make the judgment call on your own.
28 comments
CFQ. It is designed for desktop use and has been optimized for SSDs where it disables some optimizations that only make sense for rotational media.
if i admit CFQ and Deadline won't change performance on a high end laptop with standards tasks (i can be wrong), then is there a consumption gain using Deadline, or not ?
Advantage of CFQ is working ionice.
This is the reason why I ended up going back to cfq. I spent some time trying other schedulers, and for the most part, I couldn't tell much of a difference. In fact, I wrote that section on how to set the sceduler using a udev rule.
CFQ works perfectly fine, and since it is SSD aware and it allows use of ionice, it is the best choice in my opinion.
I will admit though that it was fun to learn how to use udev to change settings in response to different hardware attributres. So although I ended up back at the default, I still gained something from that experimentation.
lol. Well, at least you're not getting conflicting answers. /s
Let the thread living is life and read the votes. :)
Deadline.
Unless you have some very specific usage patterns.
BFQ (video linked in this thread).
Hey all,
i wonder what is the best scheduler for a SSD.
According wikipédia :
TL;DR : seems deadline is good for databases and noop for SSD but noop make issues on others process when copying a big file for exemple. Wich one should i use with a SSD: CFQ, deadline or Noop ?
When using the stock kernel, I prefer
deadline. I tried usingnoop, but it made my desktop freeze sometimes. Otherwise I'm always usingbfq.With a high end laptop, do you think it would make a difference ? I always wonder before make deep changes on my config because i prefer let it run on vanilla mode if ther's no real improvement.
Hardware alone probably shouldn't dictate your scheduler choice. It heavily depends on the workload you're processing.
noopmight be a sensible default since it reduces overhead while the ssd can make unordered requests no big deal, butcfqanddeadlinecan still be just as applicable as before.It depends on what the database is. deadline is hugely skewed towards reads (by default but it can be configured to be biased towards writes). This works well if it's heavy on reads and writing is a relatively exceptional event (like an LDAP directory or a web server's DocumentRoot).
If the DB is heavy on synchronous writes then it could be a worse choice. At the end of the day deadline is about latency guarantees so it may or may not be beneficial to a DBMS that reads a lot of DB/table info into memory.
Of course there's only three options you're interested in. You can install something that monitors disk I/O stats and make the judgment call on your own.
Piggybacking on this, does anyone know a good way to test cpu scheduling?
http://ck-hack.blogspot.ie/
There's a guy that comments on new releases there with benchmark results.
YMMV, depends on your use case.