138 lines · 4.8 KB · Text
RawDownload
Queue sysfs files================= This text file will detail the queue files that are located in the sysfs treefor each block device. Note that stacked devices typically do not exportany settings, since their queue merely functions are a remapping target.These files are the ones found in the /sys/block/xxx/queue/ directory. Files denoted with a RO postfix are readonly and the RW postfix meansread-write. add_random (RW)----------------This file allows to trun off the disk entropy contribution. Defaultvalue of this file is '1'(on). discard_granularity (RO)-----------------------This shows the size of internal allocation of the device in bytes, ifreported by the device. A value of '0' means device does not supportthe discard functionality. discard_max_bytes (RO)----------------------Devices that support discard functionality may have internal limits onthe number of bytes that can be trimmed or unmapped in a single operation.The discard_max_bytes parameter is set by the device driver to the maximumnumber of bytes that can be discarded in a single operation. Discardrequests issued to the device must not exceed this limit. A discard_max_bytesvalue of 0 means that the device does not support discard functionality. discard_zeroes_data (RO)------------------------When read, this file will show if the discarded block are zeroed by thedevice or not. If its value is '1' the blocks are zeroed otherwise not. hw_sector_size (RO)-------------------This is the hardware sector size of the device, in bytes. iostats (RW)-------------This file is used to control (on/off) the iostats accounting of thedisk. logical_block_size (RO)-----------------------This is the logcal block size of the device, in bytes. max_hw_sectors_kb (RO)----------------------This is the maximum number of kilobytes supported in a single data transfer. max_integrity_segments (RO)---------------------------When read, this file shows the max limit of integrity segments asset by block layer which a hardware controller can handle. max_sectors_kb (RW)-------------------This is the maximum number of kilobytes that the block layer will allowfor a filesystem request. Must be smaller than or equal to the maximumsize allowed by the hardware. max_segments (RO)-----------------Maximum number of segments of the device. max_segment_size (RO)---------------------Maximum segment size of the device. minimum_io_size (RO)--------------------This is the smallest preferred io size reported by the device. nomerges (RW)-------------This enables the user to disable the lookup logic involved with IOmerging requests in the block layer. By default (0) all merges areenabled. When set to 1 only simple one-hit merges will be tried. Whenset to 2 no merge algorithms will be tried (including one-hit or morecomplex tree/hash lookups). nr_requests (RW)----------------This controls how many requests may be allocated in the block layer forread or write requests. Note that the total allocated number may be twicethis amount, since it applies only to reads or writes (not the accumulatedsum). To avoid priority inversion through request starvation, a requestqueue maintains a separate request pool per each cgroup whenCONFIG_BLK_CGROUP is enabled, and this parameter applies to each suchper-block-cgroup request pool.  IOW, if there are N block cgroups,each request queue may have up to N request pools, each independentlyregulated by nr_requests. optimal_io_size (RO)--------------------This is the optimal io size reported by the device. physical_block_size (RO)------------------------This is the physical block size of device, in bytes. read_ahead_kb (RW)------------------Maximum number of kilobytes to read-ahead for filesystems on this blockdevice. rotational (RW)---------------This file is used to stat if the device is of rotational type ornon-rotational type. rq_affinity (RW)----------------If this option is '1', the block layer will migrate request completions to thecpu "group" that originally submitted the request. For some workloads thisprovides a significant reduction in CPU cycles due to caching effects. For storage configurations that need to maximize distribution of completionprocessing setting this option to '2' forces the completion to run on therequesting cpu (bypassing the "group" aggregation logic). scheduler (RW)--------------When read, this file will display the current and available IO schedulersfor this block device. The currently active IO scheduler will be enclosedin [] brackets. Writing an IO scheduler name to this file will switchcontrol of this block device to that new IO scheduler. Note that writingan IO scheduler name to this file will attempt to load that IO schedulermodule, if it isn't already present in the system.   Jens Axboe <jens.axboe@oracle.com>, February 2009