Filesystems
QNX SDP8.0Performance Tuning User GuideUser
This section contains performance tuning suggestions for optimizing your filesystem environment.
A filesystem disk stores files on a space formatted into a multiple of a specified block size. Devices also receive and send I/O data in a multiple of a block size. Therefore, filesystems with many tiny files benefit from smaller block sizes; filesystems with a majority of large files benefit from bigger block sizes by reduced fragmentation and less metadata overhead.
For details on filesystems,
go the Filesystems
chapter of the System Architecture guide
and the Working with Filesystems
chapter of the QNX OS User's Guide.
To tune the filesystem performance, you can use the following options:
io-blk.so options | Advantages | Disadvantages |
---|---|---|
cache — Specify the total size of the disk buffer cache, which is the intermediate storage for all disk I/O; this storage cache provides LRU caching for dirty delayed-write blocks and recently-read blocks. The default value is 2MB + 2% of the system RAM. | Increases performance. The recommended setting is between 64M and 128M; perform tests to further optimize the environment. | N/A |
map — For Power-Safe filesystems, set the number of entries in a cache used to map translations from logical blocks to physical ones. | In Power-Safe filesystem with exceptionally large files, reducing the map cache size may speed up repeated translation from logical file offsets to physical disk sectors. | N/A |
maxio — Control the size of a single request sent to the device. The default is 128 disk blocks. A block, or sector, is a single LBA or 512 bytes on all filesystems except UFS, which uses 4096 bytes per block. | Speeds up devices if the I/O size increases by as much as 2MB. Determining the optimal size requires testing, but bigger is often faster. | N/A |
ra — Set the minimum and maximum sizes of the read-ahead buffers. The default minimum is the system page size; the default maximum is 64 times the system page size. | Improves sequential read times, sometimes significantly. If the maximum ra is twice the maxio, then read-ahead can consist of at least two read requests. This increases the queue depth (QD) going to the device. For some devices, this setting has a large performance benefit; for others, it has no change. | Uses up the block cache for speculative reads. If read-ahead gets too aggressive, then it evicts important data from the cache. This results in more cache misses elsewhere and reduces overall performance. |
thread — Control the number of resource manager handler threads in the filesystem. If using a synthetic benchmark, set the value greater than or equal to the number of worker threads of the benchmark program. The default value is 8 and the maximum value is 256. | Increases performance. | The performance benefits diminish if this setting is above the optimal setting. Determining the optimal setting requires testing. |
vnode — Increase the vnode value if the system frequently scans or opens many files at once. Vnodes remain in this cache when the corresponding file closes, making subsequent scans or opens faster. Specify the number of vnode entries (filesystem-independent inodes). The default is 1024 entries. | Speeds up subsequent scans and opens. | N/A |
fs-qnx6.so (Power-Safe filesystem) options | Advantage | Disadvantage |
dirgest — Create digests for directories that hold entries within the provided range. Be sure to set an upper bound. | Speeds up repeated lookups in a large directory. The recommended range is between 1000 to 10,000 files in a single directory; perform tests to further optimize the environment. | Uses close to 64 bytes of RAM for each directory entry, making the RAM overhead significant. However, when performance gains are necessary, the trade-off may be worth it. |
overalloc — Enable a block overallocation heuristic for small file writes. | Speeds up sequential writing. | N/A |
Page updated: