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