0001 ==========================
0002 BFQ (Budget Fair Queueing)
0003 ==========================
0004
0005 BFQ is a proportional-share I/O scheduler, with some extra
0006 low-latency capabilities. In addition to cgroups support (blkio or io
0007 controllers), BFQ's main features are:
0008
0009 - BFQ guarantees a high system and application responsiveness, and a
0010 low latency for time-sensitive applications, such as audio or video
0011 players;
0012 - BFQ distributes bandwidth, and not just time, among processes or
0013 groups (switching back to time distribution when needed to keep
0014 throughput high).
0015
0016 In its default configuration, BFQ privileges latency over
0017 throughput. So, when needed for achieving a lower latency, BFQ builds
0018 schedules that may lead to a lower throughput. If your main or only
0019 goal, for a given device, is to achieve the maximum-possible
0020 throughput at all times, then do switch off all low-latency heuristics
0021 for that device, by setting low_latency to 0. See Section 3 for
0022 details on how to configure BFQ for the desired tradeoff between
0023 latency and throughput, or on how to maximize throughput.
0024
0025 As every I/O scheduler, BFQ adds some overhead to per-I/O-request
0026 processing. To give an idea of this overhead, the total,
0027 single-lock-protected, per-request processing time of BFQ---i.e., the
0028 sum of the execution times of the request insertion, dispatch and
0029 completion hooks---is, e.g., 1.9 us on an Intel Core i7-2760QM@2.40GHz
0030 (dated CPU for notebooks; time measured with simple code
0031 instrumentation, and using the throughput-sync.sh script of the S
0032 suite [1], in performance-profiling mode). To put this result into
0033 context, the total, single-lock-protected, per-request execution time
0034 of the lightest I/O scheduler available in blk-mq, mq-deadline, is 0.7
0035 us (mq-deadline is ~800 LOC, against ~10500 LOC for BFQ).
0036
0037 Scheduling overhead further limits the maximum IOPS that a CPU can
0038 process (already limited by the execution of the rest of the I/O
0039 stack). To give an idea of the limits with BFQ, on slow or average
0040 CPUs, here are, first, the limits of BFQ for three different CPUs, on,
0041 respectively, an average laptop, an old desktop, and a cheap embedded
0042 system, in case full hierarchical support is enabled (i.e.,
0043 CONFIG_BFQ_GROUP_IOSCHED is set), but CONFIG_BFQ_CGROUP_DEBUG is not
0044 set (Section 4-2):
0045 - Intel i7-4850HQ: 400 KIOPS
0046 - AMD A8-3850: 250 KIOPS
0047 - ARM CortexTM-A53 Octa-core: 80 KIOPS
0048
0049 If CONFIG_BFQ_CGROUP_DEBUG is set (and of course full hierarchical
0050 support is enabled), then the sustainable throughput with BFQ
0051 decreases, because all blkio.bfq* statistics are created and updated
0052 (Section 4-2). For BFQ, this leads to the following maximum
0053 sustainable throughputs, on the same systems as above:
0054 - Intel i7-4850HQ: 310 KIOPS
0055 - AMD A8-3850: 200 KIOPS
0056 - ARM CortexTM-A53 Octa-core: 56 KIOPS
0057
0058 BFQ works for multi-queue devices too.
0059
0060 .. The table of contents follow. Impatients can just jump to Section 3.
0061
0062 .. CONTENTS
0063
0064 1. When may BFQ be useful?
0065 1-1 Personal systems
0066 1-2 Server systems
0067 2. How does BFQ work?
0068 3. What are BFQ's tunables and how to properly configure BFQ?
0069 4. BFQ group scheduling
0070 4-1 Service guarantees provided
0071 4-2 Interface
0072
0073 1. When may BFQ be useful?
0074 ==========================
0075
0076 BFQ provides the following benefits on personal and server systems.
0077
0078 1-1 Personal systems
0079 --------------------
0080
0081 Low latency for interactive applications
0082 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0083
0084 Regardless of the actual background workload, BFQ guarantees that, for
0085 interactive tasks, the storage device is virtually as responsive as if
0086 it was idle. For example, even if one or more of the following
0087 background workloads are being executed:
0088
0089 - one or more large files are being read, written or copied,
0090 - a tree of source files is being compiled,
0091 - one or more virtual machines are performing I/O,
0092 - a software update is in progress,
0093 - indexing daemons are scanning filesystems and updating their
0094 databases,
0095
0096 starting an application or loading a file from within an application
0097 takes about the same time as if the storage device was idle. As a
0098 comparison, with CFQ, NOOP or DEADLINE, and in the same conditions,
0099 applications experience high latencies, or even become unresponsive
0100 until the background workload terminates (also on SSDs).
0101
0102 Low latency for soft real-time applications
0103 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0104 Also soft real-time applications, such as audio and video
0105 players/streamers, enjoy a low latency and a low drop rate, regardless
0106 of the background I/O workload. As a consequence, these applications
0107 do not suffer from almost any glitch due to the background workload.
0108
0109 Higher speed for code-development tasks
0110 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0111
0112 If some additional workload happens to be executed in parallel, then
0113 BFQ executes the I/O-related components of typical code-development
0114 tasks (compilation, checkout, merge, ...) much more quickly than CFQ,
0115 NOOP or DEADLINE.
0116
0117 High throughput
0118 ^^^^^^^^^^^^^^^
0119
0120 On hard disks, BFQ achieves up to 30% higher throughput than CFQ, and
0121 up to 150% higher throughput than DEADLINE and NOOP, with all the
0122 sequential workloads considered in our tests. With random workloads,
0123 and with all the workloads on flash-based devices, BFQ achieves,
0124 instead, about the same throughput as the other schedulers.
0125
0126 Strong fairness, bandwidth and delay guarantees
0127 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0128
0129 BFQ distributes the device throughput, and not just the device time,
0130 among I/O-bound applications in proportion their weights, with any
0131 workload and regardless of the device parameters. From these bandwidth
0132 guarantees, it is possible to compute tight per-I/O-request delay
0133 guarantees by a simple formula. If not configured for strict service
0134 guarantees, BFQ switches to time-based resource sharing (only) for
0135 applications that would otherwise cause a throughput loss.
0136
0137 1-2 Server systems
0138 ------------------
0139
0140 Most benefits for server systems follow from the same service
0141 properties as above. In particular, regardless of whether additional,
0142 possibly heavy workloads are being served, BFQ guarantees:
0143
0144 * audio and video-streaming with zero or very low jitter and drop
0145 rate;
0146
0147 * fast retrieval of WEB pages and embedded objects;
0148
0149 * real-time recording of data in live-dumping applications (e.g.,
0150 packet logging);
0151
0152 * responsiveness in local and remote access to a server.
0153
0154
0155 2. How does BFQ work?
0156 =====================
0157
0158 BFQ is a proportional-share I/O scheduler, whose general structure,
0159 plus a lot of code, are borrowed from CFQ.
0160
0161 - Each process doing I/O on a device is associated with a weight and a
0162 `(bfq_)queue`.
0163
0164 - BFQ grants exclusive access to the device, for a while, to one queue
0165 (process) at a time, and implements this service model by
0166 associating every queue with a budget, measured in number of
0167 sectors.
0168
0169 - After a queue is granted access to the device, the budget of the
0170 queue is decremented, on each request dispatch, by the size of the
0171 request.
0172
0173 - The in-service queue is expired, i.e., its service is suspended,
0174 only if one of the following events occurs: 1) the queue finishes
0175 its budget, 2) the queue empties, 3) a "budget timeout" fires.
0176
0177 - The budget timeout prevents processes doing random I/O from
0178 holding the device for too long and dramatically reducing
0179 throughput.
0180
0181 - Actually, as in CFQ, a queue associated with a process issuing
0182 sync requests may not be expired immediately when it empties. In
0183 contrast, BFQ may idle the device for a short time interval,
0184 giving the process the chance to go on being served if it issues
0185 a new request in time. Device idling typically boosts the
0186 throughput on rotational devices and on non-queueing flash-based
0187 devices, if processes do synchronous and sequential I/O. In
0188 addition, under BFQ, device idling is also instrumental in
0189 guaranteeing the desired throughput fraction to processes
0190 issuing sync requests (see the description of the slice_idle
0191 tunable in this document, or [1, 2], for more details).
0192
0193 - With respect to idling for service guarantees, if several
0194 processes are competing for the device at the same time, but
0195 all processes and groups have the same weight, then BFQ
0196 guarantees the expected throughput distribution without ever
0197 idling the device. Throughput is thus as high as possible in
0198 this common scenario.
0199
0200 - On flash-based storage with internal queueing of commands
0201 (typically NCQ), device idling happens to be always detrimental
0202 for throughput. So, with these devices, BFQ performs idling
0203 only when strictly needed for service guarantees, i.e., for
0204 guaranteeing low latency or fairness. In these cases, overall
0205 throughput may be sub-optimal. No solution currently exists to
0206 provide both strong service guarantees and optimal throughput
0207 on devices with internal queueing.
0208
0209 - If low-latency mode is enabled (default configuration), BFQ
0210 executes some special heuristics to detect interactive and soft
0211 real-time applications (e.g., video or audio players/streamers),
0212 and to reduce their latency. The most important action taken to
0213 achieve this goal is to give to the queues associated with these
0214 applications more than their fair share of the device
0215 throughput. For brevity, we call just "weight-raising" the whole
0216 sets of actions taken by BFQ to privilege these queues. In
0217 particular, BFQ provides a milder form of weight-raising for
0218 interactive applications, and a stronger form for soft real-time
0219 applications.
0220
0221 - BFQ automatically deactivates idling for queues born in a burst of
0222 queue creations. In fact, these queues are usually associated with
0223 the processes of applications and services that benefit mostly
0224 from a high throughput. Examples are systemd during boot, or git
0225 grep.
0226
0227 - As CFQ, BFQ merges queues performing interleaved I/O, i.e.,
0228 performing random I/O that becomes mostly sequential if
0229 merged. Differently from CFQ, BFQ achieves this goal with a more
0230 reactive mechanism, called Early Queue Merge (EQM). EQM is so
0231 responsive in detecting interleaved I/O (cooperating processes),
0232 that it enables BFQ to achieve a high throughput, by queue
0233 merging, even for queues for which CFQ needs a different
0234 mechanism, preemption, to get a high throughput. As such EQM is a
0235 unified mechanism to achieve a high throughput with interleaved
0236 I/O.
0237
0238 - Queues are scheduled according to a variant of WF2Q+, named
0239 B-WF2Q+, and implemented using an augmented rb-tree to preserve an
0240 O(log N) overall complexity. See [2] for more details. B-WF2Q+ is
0241 also ready for hierarchical scheduling, details in Section 4.
0242
0243 - B-WF2Q+ guarantees a tight deviation with respect to an ideal,
0244 perfectly fair, and smooth service. In particular, B-WF2Q+
0245 guarantees that each queue receives a fraction of the device
0246 throughput proportional to its weight, even if the throughput
0247 fluctuates, and regardless of: the device parameters, the current
0248 workload and the budgets assigned to the queue.
0249
0250 - The last, budget-independence, property (although probably
0251 counterintuitive in the first place) is definitely beneficial, for
0252 the following reasons:
0253
0254 - First, with any proportional-share scheduler, the maximum
0255 deviation with respect to an ideal service is proportional to
0256 the maximum budget (slice) assigned to queues. As a consequence,
0257 BFQ can keep this deviation tight not only because of the
0258 accurate service of B-WF2Q+, but also because BFQ *does not*
0259 need to assign a larger budget to a queue to let the queue
0260 receive a higher fraction of the device throughput.
0261
0262 - Second, BFQ is free to choose, for every process (queue), the
0263 budget that best fits the needs of the process, or best
0264 leverages the I/O pattern of the process. In particular, BFQ
0265 updates queue budgets with a simple feedback-loop algorithm that
0266 allows a high throughput to be achieved, while still providing
0267 tight latency guarantees to time-sensitive applications. When
0268 the in-service queue expires, this algorithm computes the next
0269 budget of the queue so as to:
0270
0271 - Let large budgets be eventually assigned to the queues
0272 associated with I/O-bound applications performing sequential
0273 I/O: in fact, the longer these applications are served once
0274 got access to the device, the higher the throughput is.
0275
0276 - Let small budgets be eventually assigned to the queues
0277 associated with time-sensitive applications (which typically
0278 perform sporadic and short I/O), because, the smaller the
0279 budget assigned to a queue waiting for service is, the sooner
0280 B-WF2Q+ will serve that queue (Subsec 3.3 in [2]).
0281
0282 - If several processes are competing for the device at the same time,
0283 but all processes and groups have the same weight, then BFQ
0284 guarantees the expected throughput distribution without ever idling
0285 the device. It uses preemption instead. Throughput is then much
0286 higher in this common scenario.
0287
0288 - ioprio classes are served in strict priority order, i.e.,
0289 lower-priority queues are not served as long as there are
0290 higher-priority queues. Among queues in the same class, the
0291 bandwidth is distributed in proportion to the weight of each
0292 queue. A very thin extra bandwidth is however guaranteed to
0293 the Idle class, to prevent it from starving.
0294
0295
0296 3. What are BFQ's tunables and how to properly configure BFQ?
0297 =============================================================
0298
0299 Most BFQ tunables affect service guarantees (basically latency and
0300 fairness) and throughput. For full details on how to choose the
0301 desired tradeoff between service guarantees and throughput, see the
0302 parameters slice_idle, strict_guarantees and low_latency. For details
0303 on how to maximise throughput, see slice_idle, timeout_sync and
0304 max_budget. The other performance-related parameters have been
0305 inherited from, and have been preserved mostly for compatibility with
0306 CFQ. So far, no performance improvement has been reported after
0307 changing the latter parameters in BFQ.
0308
0309 In particular, the tunables back_seek-max, back_seek_penalty,
0310 fifo_expire_async and fifo_expire_sync below are the same as in
0311 CFQ. Their description is just copied from that for CFQ. Some
0312 considerations in the description of slice_idle are copied from CFQ
0313 too.
0314
0315 per-process ioprio and weight
0316 -----------------------------
0317
0318 Unless the cgroups interface is used (see "4. BFQ group scheduling"),
0319 weights can be assigned to processes only indirectly, through I/O
0320 priorities, and according to the relation:
0321 weight = (IOPRIO_BE_NR - ioprio) * 10.
0322
0323 Beware that, if low-latency is set, then BFQ automatically raises the
0324 weight of the queues associated with interactive and soft real-time
0325 applications. Unset this tunable if you need/want to control weights.
0326
0327 slice_idle
0328 ----------
0329
0330 This parameter specifies how long BFQ should idle for next I/O
0331 request, when certain sync BFQ queues become empty. By default
0332 slice_idle is a non-zero value. Idling has a double purpose: boosting
0333 throughput and making sure that the desired throughput distribution is
0334 respected (see the description of how BFQ works, and, if needed, the
0335 papers referred there).
0336
0337 As for throughput, idling can be very helpful on highly seeky media
0338 like single spindle SATA/SAS disks where we can cut down on overall
0339 number of seeks and see improved throughput.
0340
0341 Setting slice_idle to 0 will remove all the idling on queues and one
0342 should see an overall improved throughput on faster storage devices
0343 like multiple SATA/SAS disks in hardware RAID configuration, as well
0344 as flash-based storage with internal command queueing (and
0345 parallelism).
0346
0347 So depending on storage and workload, it might be useful to set
0348 slice_idle=0. In general for SATA/SAS disks and software RAID of
0349 SATA/SAS disks keeping slice_idle enabled should be useful. For any
0350 configurations where there are multiple spindles behind single LUN
0351 (Host based hardware RAID controller or for storage arrays), or with
0352 flash-based fast storage, setting slice_idle=0 might end up in better
0353 throughput and acceptable latencies.
0354
0355 Idling is however necessary to have service guarantees enforced in
0356 case of differentiated weights or differentiated I/O-request lengths.
0357 To see why, suppose that a given BFQ queue A must get several I/O
0358 requests served for each request served for another queue B. Idling
0359 ensures that, if A makes a new I/O request slightly after becoming
0360 empty, then no request of B is dispatched in the middle, and thus A
0361 does not lose the possibility to get more than one request dispatched
0362 before the next request of B is dispatched. Note that idling
0363 guarantees the desired differentiated treatment of queues only in
0364 terms of I/O-request dispatches. To guarantee that the actual service
0365 order then corresponds to the dispatch order, the strict_guarantees
0366 tunable must be set too.
0367
0368 There is an important flipside for idling: apart from the above cases
0369 where it is beneficial also for throughput, idling can severely impact
0370 throughput. One important case is random workload. Because of this
0371 issue, BFQ tends to avoid idling as much as possible, when it is not
0372 beneficial also for throughput (as detailed in Section 2). As a
0373 consequence of this behavior, and of further issues described for the
0374 strict_guarantees tunable, short-term service guarantees may be
0375 occasionally violated. And, in some cases, these guarantees may be
0376 more important than guaranteeing maximum throughput. For example, in
0377 video playing/streaming, a very low drop rate may be more important
0378 than maximum throughput. In these cases, consider setting the
0379 strict_guarantees parameter.
0380
0381 slice_idle_us
0382 -------------
0383
0384 Controls the same tuning parameter as slice_idle, but in microseconds.
0385 Either tunable can be used to set idling behavior. Afterwards, the
0386 other tunable will reflect the newly set value in sysfs.
0387
0388 strict_guarantees
0389 -----------------
0390
0391 If this parameter is set (default: unset), then BFQ
0392
0393 - always performs idling when the in-service queue becomes empty;
0394
0395 - forces the device to serve one I/O request at a time, by dispatching a
0396 new request only if there is no outstanding request.
0397
0398 In the presence of differentiated weights or I/O-request sizes, both
0399 the above conditions are needed to guarantee that every BFQ queue
0400 receives its allotted share of the bandwidth. The first condition is
0401 needed for the reasons explained in the description of the slice_idle
0402 tunable. The second condition is needed because all modern storage
0403 devices reorder internally-queued requests, which may trivially break
0404 the service guarantees enforced by the I/O scheduler.
0405
0406 Setting strict_guarantees may evidently affect throughput.
0407
0408 back_seek_max
0409 -------------
0410
0411 This specifies, given in Kbytes, the maximum "distance" for backward seeking.
0412 The distance is the amount of space from the current head location to the
0413 sectors that are backward in terms of distance.
0414
0415 This parameter allows the scheduler to anticipate requests in the "backward"
0416 direction and consider them as being the "next" if they are within this
0417 distance from the current head location.
0418
0419 back_seek_penalty
0420 -----------------
0421
0422 This parameter is used to compute the cost of backward seeking. If the
0423 backward distance of request is just 1/back_seek_penalty from a "front"
0424 request, then the seeking cost of two requests is considered equivalent.
0425
0426 So scheduler will not bias toward one or the other request (otherwise scheduler
0427 will bias toward front request). Default value of back_seek_penalty is 2.
0428
0429 fifo_expire_async
0430 -----------------
0431
0432 This parameter is used to set the timeout of asynchronous requests. Default
0433 value of this is 250ms.
0434
0435 fifo_expire_sync
0436 ----------------
0437
0438 This parameter is used to set the timeout of synchronous requests. Default
0439 value of this is 125ms. In case to favor synchronous requests over asynchronous
0440 one, this value should be decreased relative to fifo_expire_async.
0441
0442 low_latency
0443 -----------
0444
0445 This parameter is used to enable/disable BFQ's low latency mode. By
0446 default, low latency mode is enabled. If enabled, interactive and soft
0447 real-time applications are privileged and experience a lower latency,
0448 as explained in more detail in the description of how BFQ works.
0449
0450 DISABLE this mode if you need full control on bandwidth
0451 distribution. In fact, if it is enabled, then BFQ automatically
0452 increases the bandwidth share of privileged applications, as the main
0453 means to guarantee a lower latency to them.
0454
0455 In addition, as already highlighted at the beginning of this document,
0456 DISABLE this mode if your only goal is to achieve a high throughput.
0457 In fact, privileging the I/O of some application over the rest may
0458 entail a lower throughput. To achieve the highest-possible throughput
0459 on a non-rotational device, setting slice_idle to 0 may be needed too
0460 (at the cost of giving up any strong guarantee on fairness and low
0461 latency).
0462
0463 timeout_sync
0464 ------------
0465
0466 Maximum amount of device time that can be given to a task (queue) once
0467 it has been selected for service. On devices with costly seeks,
0468 increasing this time usually increases maximum throughput. On the
0469 opposite end, increasing this time coarsens the granularity of the
0470 short-term bandwidth and latency guarantees, especially if the
0471 following parameter is set to zero.
0472
0473 max_budget
0474 ----------
0475
0476 Maximum amount of service, measured in sectors, that can be provided
0477 to a BFQ queue once it is set in service (of course within the limits
0478 of the above timeout). According to what said in the description of
0479 the algorithm, larger values increase the throughput in proportion to
0480 the percentage of sequential I/O requests issued. The price of larger
0481 values is that they coarsen the granularity of short-term bandwidth
0482 and latency guarantees.
0483
0484 The default value is 0, which enables auto-tuning: BFQ sets max_budget
0485 to the maximum number of sectors that can be served during
0486 timeout_sync, according to the estimated peak rate.
0487
0488 For specific devices, some users have occasionally reported to have
0489 reached a higher throughput by setting max_budget explicitly, i.e., by
0490 setting max_budget to a higher value than 0. In particular, they have
0491 set max_budget to higher values than those to which BFQ would have set
0492 it with auto-tuning. An alternative way to achieve this goal is to
0493 just increase the value of timeout_sync, leaving max_budget equal to 0.
0494
0495 4. Group scheduling with BFQ
0496 ============================
0497
0498 BFQ supports both cgroups-v1 and cgroups-v2 io controllers, namely
0499 blkio and io. In particular, BFQ supports weight-based proportional
0500 share. To activate cgroups support, set BFQ_GROUP_IOSCHED.
0501
0502 4-1 Service guarantees provided
0503 -------------------------------
0504
0505 With BFQ, proportional share means true proportional share of the
0506 device bandwidth, according to group weights. For example, a group
0507 with weight 200 gets twice the bandwidth, and not just twice the time,
0508 of a group with weight 100.
0509
0510 BFQ supports hierarchies (group trees) of any depth. Bandwidth is
0511 distributed among groups and processes in the expected way: for each
0512 group, the children of the group share the whole bandwidth of the
0513 group in proportion to their weights. In particular, this implies
0514 that, for each leaf group, every process of the group receives the
0515 same share of the whole group bandwidth, unless the ioprio of the
0516 process is modified.
0517
0518 The resource-sharing guarantee for a group may partially or totally
0519 switch from bandwidth to time, if providing bandwidth guarantees to
0520 the group lowers the throughput too much. This switch occurs on a
0521 per-process basis: if a process of a leaf group causes throughput loss
0522 if served in such a way to receive its share of the bandwidth, then
0523 BFQ switches back to just time-based proportional share for that
0524 process.
0525
0526 4-2 Interface
0527 -------------
0528
0529 To get proportional sharing of bandwidth with BFQ for a given device,
0530 BFQ must of course be the active scheduler for that device.
0531
0532 Within each group directory, the names of the files associated with
0533 BFQ-specific cgroup parameters and stats begin with the "bfq."
0534 prefix. So, with cgroups-v1 or cgroups-v2, the full prefix for
0535 BFQ-specific files is "blkio.bfq." or "io.bfq." For example, the group
0536 parameter to set the weight of a group with BFQ is blkio.bfq.weight
0537 or io.bfq.weight.
0538
0539 As for cgroups-v1 (blkio controller), the exact set of stat files
0540 created, and kept up-to-date by bfq, depends on whether
0541 CONFIG_BFQ_CGROUP_DEBUG is set. If it is set, then bfq creates all
0542 the stat files documented in
0543 Documentation/admin-guide/cgroup-v1/blkio-controller.rst. If, instead,
0544 CONFIG_BFQ_CGROUP_DEBUG is not set, then bfq creates only the files::
0545
0546 blkio.bfq.io_service_bytes
0547 blkio.bfq.io_service_bytes_recursive
0548 blkio.bfq.io_serviced
0549 blkio.bfq.io_serviced_recursive
0550
0551 The value of CONFIG_BFQ_CGROUP_DEBUG greatly influences the maximum
0552 throughput sustainable with bfq, because updating the blkio.bfq.*
0553 stats is rather costly, especially for some of the stats enabled by
0554 CONFIG_BFQ_CGROUP_DEBUG.
0555
0556 Parameters
0557 ----------
0558
0559 For each group, the following parameters can be set:
0560
0561 weight
0562 This specifies the default weight for the cgroup inside its parent.
0563 Available values: 1..1000 (default: 100).
0564
0565 For cgroup v1, it is set by writing the value to `blkio.bfq.weight`.
0566
0567 For cgroup v2, it is set by writing the value to `io.bfq.weight`.
0568 (with an optional prefix of `default` and a space).
0569
0570 The linear mapping between ioprio and weights, described at the beginning
0571 of the tunable section, is still valid, but all weights higher than
0572 IOPRIO_BE_NR*10 are mapped to ioprio 0.
0573
0574 Recall that, if low-latency is set, then BFQ automatically raises the
0575 weight of the queues associated with interactive and soft real-time
0576 applications. Unset this tunable if you need/want to control weights.
0577
0578 weight_device
0579 This specifies a per-device weight for the cgroup. The syntax is
0580 `minor:major weight`. A weight of `0` may be used to reset to the default
0581 weight.
0582
0583 For cgroup v1, it is set by writing the value to `blkio.bfq.weight_device`.
0584
0585 For cgroup v2, the file name is `io.bfq.weight`.
0586
0587
0588 [1]
0589 P. Valente, A. Avanzini, "Evolution of the BFQ Storage I/O
0590 Scheduler", Proceedings of the First Workshop on Mobile System
0591 Technologies (MST-2015), May 2015.
0592
0593 http://algogroup.unimore.it/people/paolo/disk_sched/mst-2015.pdf
0594
0595 [2]
0596 P. Valente and M. Andreolini, "Improving Application
0597 Responsiveness with the BFQ Disk I/O Scheduler", Proceedings of
0598 the 5th Annual International Systems and Storage Conference
0599 (SYSTOR '12), June 2012.
0600
0601 Slightly extended version:
0602
0603 http://algogroup.unimore.it/people/paolo/disk_sched/bfq-v1-suite-results.pdf
0604
0605 [3]
0606 https://github.com/Algodev-github/S