blob: e54ac1d53403094c59e019b1f5e5397e8f4f637d [file] [log] [blame]
Jens Axboecbb59012009-02-02 13:02:31 +01001Queue sysfs files
2=================
3
4This text file will detail the queue files that are located in the sysfs tree
5for each block device. Note that stacked devices typically do not export
6any settings, since their queue merely functions are a remapping target.
7These files are the ones found in the /sys/block/xxx/queue/ directory.
8
9Files denoted with a RO postfix are readonly and the RW postfix means
10read-write.
11
Namjae Jeon4004e902012-08-09 15:28:05 +020012add_random (RW)
13----------------
14This file allows to trun off the disk entropy contribution. Default
15value of this file is '1'(on).
16
17discard_granularity (RO)
18-----------------------
19This shows the size of internal allocation of the device in bytes, if
20reported by the device. A value of '0' means device does not support
21the discard functionality.
22
23discard_max_bytes (RO)
24----------------------
25Devices that support discard functionality may have internal limits on
26the number of bytes that can be trimmed or unmapped in a single operation.
27The discard_max_bytes parameter is set by the device driver to the maximum
28number of bytes that can be discarded in a single operation. Discard
29requests issued to the device must not exceed this limit. A discard_max_bytes
30value of 0 means that the device does not support discard functionality.
31
32discard_zeroes_data (RO)
33------------------------
34When read, this file will show if the discarded block are zeroed by the
35device or not. If its value is '1' the blocks are zeroed otherwise not.
36
Jens Axboecbb59012009-02-02 13:02:31 +010037hw_sector_size (RO)
38-------------------
39This is the hardware sector size of the device, in bytes.
40
Namjae Jeon4004e902012-08-09 15:28:05 +020041iostats (RW)
42-------------
43This file is used to control (on/off) the iostats accounting of the
44disk.
45
46logical_block_size (RO)
47-----------------------
48This is the logcal block size of the device, in bytes.
49
Jens Axboecbb59012009-02-02 13:02:31 +010050max_hw_sectors_kb (RO)
51----------------------
52This is the maximum number of kilobytes supported in a single data transfer.
53
Namjae Jeon4004e902012-08-09 15:28:05 +020054max_integrity_segments (RO)
55---------------------------
56When read, this file shows the max limit of integrity segments as
57set by block layer which a hardware controller can handle.
58
Jens Axboecbb59012009-02-02 13:02:31 +010059max_sectors_kb (RW)
60-------------------
61This is the maximum number of kilobytes that the block layer will allow
62for a filesystem request. Must be smaller than or equal to the maximum
63size allowed by the hardware.
64
Namjae Jeon4004e902012-08-09 15:28:05 +020065max_segments (RO)
66-----------------
67Maximum number of segments of the device.
68
69max_segment_size (RO)
70---------------------
71Maximum segment size of the device.
72
73minimum_io_size (RO)
74--------------------
75This is the smallest preferred io size reported by the device.
76
Jens Axboecbb59012009-02-02 13:02:31 +010077nomerges (RW)
78-------------
Alan D. Brunelle488991e2010-01-29 09:04:08 +010079This enables the user to disable the lookup logic involved with IO
80merging requests in the block layer. By default (0) all merges are
81enabled. When set to 1 only simple one-hit merges will be tried. When
82set to 2 no merge algorithms will be tried (including one-hit or more
83complex tree/hash lookups).
Jens Axboecbb59012009-02-02 13:02:31 +010084
85nr_requests (RW)
86----------------
87This controls how many requests may be allocated in the block layer for
88read or write requests. Note that the total allocated number may be twice
89this amount, since it applies only to reads or writes (not the accumulated
90sum).
91
Tejun Heoa0516612012-06-26 15:05:44 -070092To avoid priority inversion through request starvation, a request
93queue maintains a separate request pool per each cgroup when
94CONFIG_BLK_CGROUP is enabled, and this parameter applies to each such
95per-block-cgroup request pool. IOW, if there are N block cgroups,
96each request queue may have upto N request pools, each independently
97regulated by nr_requests.
98
Namjae Jeon4004e902012-08-09 15:28:05 +020099optimal_io_size (RO)
100--------------------
101This is the optimal io size reported by the device.
102
103physical_block_size (RO)
104------------------------
105This is the physical block size of device, in bytes.
106
Jens Axboecbb59012009-02-02 13:02:31 +0100107read_ahead_kb (RW)
108------------------
109Maximum number of kilobytes to read-ahead for filesystems on this block
110device.
111
Namjae Jeon4004e902012-08-09 15:28:05 +0200112rotational (RW)
113---------------
114This file is used to stat if the device is of rotational type or
115non-rotational type.
116
Jens Axboecbb59012009-02-02 13:02:31 +0100117rq_affinity (RW)
118----------------
Dan Williams5757a6d2011-07-23 20:44:25 +0200119If this option is '1', the block layer will migrate request completions to the
120cpu "group" that originally submitted the request. For some workloads this
121provides a significant reduction in CPU cycles due to caching effects.
122
123For storage configurations that need to maximize distribution of completion
124processing setting this option to '2' forces the completion to run on the
125requesting cpu (bypassing the "group" aggregation logic).
Jens Axboecbb59012009-02-02 13:02:31 +0100126
127scheduler (RW)
128--------------
129When read, this file will display the current and available IO schedulers
130for this block device. The currently active IO scheduler will be enclosed
131in [] brackets. Writing an IO scheduler name to this file will switch
132control of this block device to that new IO scheduler. Note that writing
133an IO scheduler name to this file will attempt to load that IO scheduler
134module, if it isn't already present in the system.
135
136
137
138Jens Axboe <jens.axboe@oracle.com>, February 2009