blob: 2a3904030dea5d287f6e1dc2f8f93461707ae018 [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----------------
Arnd Hannemanndb4ced12014-08-26 12:33:20 +020014This file allows to turn off the disk entropy contribution. Default
Namjae Jeon4004e902012-08-09 15:28:05 +020015value of this file is '1'(on).
16
Joe Lawrence005411e2016-08-09 14:01:30 -040017dax (RO)
18--------
19This file indicates whether the device supports Direct Access (DAX),
20used by CPU-addressable storage to bypass the pagecache. It shows '1'
21if true, '0' if not.
22
Namjae Jeon4004e902012-08-09 15:28:05 +020023discard_granularity (RO)
24-----------------------
25This shows the size of internal allocation of the device in bytes, if
26reported by the device. A value of '0' means device does not support
27the discard functionality.
28
Jens Axboe0034af02015-07-16 09:14:26 -060029discard_max_hw_bytes (RO)
Namjae Jeon4004e902012-08-09 15:28:05 +020030----------------------
31Devices that support discard functionality may have internal limits on
32the number of bytes that can be trimmed or unmapped in a single operation.
33The discard_max_bytes parameter is set by the device driver to the maximum
34number of bytes that can be discarded in a single operation. Discard
35requests issued to the device must not exceed this limit. A discard_max_bytes
36value of 0 means that the device does not support discard functionality.
37
Jens Axboe0034af02015-07-16 09:14:26 -060038discard_max_bytes (RW)
39----------------------
40While discard_max_hw_bytes is the hardware limit for the device, this
41setting is the software limit. Some devices exhibit large latencies when
42large discards are issued, setting this value lower will make Linux issue
43smaller discards and potentially help reduce latencies induced by large
44discard operations.
45
Namjae Jeon4004e902012-08-09 15:28:05 +020046discard_zeroes_data (RO)
47------------------------
48When read, this file will show if the discarded block are zeroed by the
49device or not. If its value is '1' the blocks are zeroed otherwise not.
50
Jens Axboecbb59012009-02-02 13:02:31 +010051hw_sector_size (RO)
52-------------------
53This is the hardware sector size of the device, in bytes.
54
Joe Lawrence005411e2016-08-09 14:01:30 -040055io_poll (RW)
56------------
57When read, this file shows the total number of block IO polls and how
58many returned success. Writing '0' to this file will disable polling
59for this device. Writing any non-zero value will enable this feature.
60
Namjae Jeon4004e902012-08-09 15:28:05 +020061iostats (RW)
62-------------
63This file is used to control (on/off) the iostats accounting of the
64disk.
65
66logical_block_size (RO)
67-----------------------
Masanari Iida141fd282016-06-29 05:10:57 +090068This is the logical block size of the device, in bytes.
Namjae Jeon4004e902012-08-09 15:28:05 +020069
Jens Axboecbb59012009-02-02 13:02:31 +010070max_hw_sectors_kb (RO)
71----------------------
72This is the maximum number of kilobytes supported in a single data transfer.
73
Namjae Jeon4004e902012-08-09 15:28:05 +020074max_integrity_segments (RO)
75---------------------------
76When read, this file shows the max limit of integrity segments as
77set by block layer which a hardware controller can handle.
78
Jens Axboecbb59012009-02-02 13:02:31 +010079max_sectors_kb (RW)
80-------------------
81This is the maximum number of kilobytes that the block layer will allow
82for a filesystem request. Must be smaller than or equal to the maximum
83size allowed by the hardware.
84
Namjae Jeon4004e902012-08-09 15:28:05 +020085max_segments (RO)
86-----------------
87Maximum number of segments of the device.
88
89max_segment_size (RO)
90---------------------
91Maximum segment size of the device.
92
93minimum_io_size (RO)
94--------------------
Arnd Hannemanndb4ced12014-08-26 12:33:20 +020095This is the smallest preferred IO size reported by the device.
Namjae Jeon4004e902012-08-09 15:28:05 +020096
Jens Axboecbb59012009-02-02 13:02:31 +010097nomerges (RW)
98-------------
Alan D. Brunelle488991e2010-01-29 09:04:08 +010099This enables the user to disable the lookup logic involved with IO
100merging requests in the block layer. By default (0) all merges are
101enabled. When set to 1 only simple one-hit merges will be tried. When
102set to 2 no merge algorithms will be tried (including one-hit or more
103complex tree/hash lookups).
Jens Axboecbb59012009-02-02 13:02:31 +0100104
105nr_requests (RW)
106----------------
107This controls how many requests may be allocated in the block layer for
108read or write requests. Note that the total allocated number may be twice
109this amount, since it applies only to reads or writes (not the accumulated
110sum).
111
Tejun Heoa0516612012-06-26 15:05:44 -0700112To avoid priority inversion through request starvation, a request
113queue maintains a separate request pool per each cgroup when
114CONFIG_BLK_CGROUP is enabled, and this parameter applies to each such
115per-block-cgroup request pool. IOW, if there are N block cgroups,
Anatol Pomozovf884ab12013-05-08 16:56:16 -0700116each request queue may have up to N request pools, each independently
Tejun Heoa0516612012-06-26 15:05:44 -0700117regulated by nr_requests.
118
Namjae Jeon4004e902012-08-09 15:28:05 +0200119optimal_io_size (RO)
120--------------------
Arnd Hannemanndb4ced12014-08-26 12:33:20 +0200121This is the optimal IO size reported by the device.
Namjae Jeon4004e902012-08-09 15:28:05 +0200122
123physical_block_size (RO)
124------------------------
125This is the physical block size of device, in bytes.
126
Jens Axboecbb59012009-02-02 13:02:31 +0100127read_ahead_kb (RW)
128------------------
129Maximum number of kilobytes to read-ahead for filesystems on this block
130device.
131
Namjae Jeon4004e902012-08-09 15:28:05 +0200132rotational (RW)
133---------------
134This file is used to stat if the device is of rotational type or
135non-rotational type.
136
Jens Axboecbb59012009-02-02 13:02:31 +0100137rq_affinity (RW)
138----------------
Dan Williams5757a6d2011-07-23 20:44:25 +0200139If this option is '1', the block layer will migrate request completions to the
140cpu "group" that originally submitted the request. For some workloads this
141provides a significant reduction in CPU cycles due to caching effects.
142
143For storage configurations that need to maximize distribution of completion
144processing setting this option to '2' forces the completion to run on the
145requesting cpu (bypassing the "group" aggregation logic).
Jens Axboecbb59012009-02-02 13:02:31 +0100146
147scheduler (RW)
148--------------
149When read, this file will display the current and available IO schedulers
150for this block device. The currently active IO scheduler will be enclosed
151in [] brackets. Writing an IO scheduler name to this file will switch
152control of this block device to that new IO scheduler. Note that writing
153an IO scheduler name to this file will attempt to load that IO scheduler
154module, if it isn't already present in the system.
155
Jens Axboe93e9d8e2016-04-12 12:32:46 -0600156write_cache (RW)
157----------------
158When read, this file will display whether the device has write back
159caching enabled or not. It will return "write back" for the former
160case, and "write through" for the latter. Writing to this file can
161change the kernels view of the device, but it doesn't alter the
162device state. This means that it might not be safe to toggle the
163setting from "write back" to "write through", since that will also
164eliminate cache flushes issued by the kernel.
Jens Axboecbb59012009-02-02 13:02:31 +0100165
Joe Lawrence005411e2016-08-09 14:01:30 -0400166write_same_max_bytes (RO)
167-------------------------
168This is the number of bytes the device can write in a single write-same
169command. A value of '0' means write-same is not supported by this
170device.
171
Jens Axboecbb59012009-02-02 13:02:31 +0100172
173Jens Axboe <jens.axboe@oracle.com>, February 2009