-
-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Instead of enabling merges on all blocks, enable them only on physical blocks, eliminating the need to enable them on virtual blocks/partitions. This reduces the overhead of merging on blocks that don't benefit from merges, such as virtual blocks. These blocks don't benefit from merges because they act as a "translator" for physical blocks. Therefore, combining requests for them and physical blocks is less efficient, because merging only on physical blocks already captures requests from virtual/non-physical blocks.
Furthermore, disable iostats only on non-physical/virtual blocks. This reduces the overhead of monitoring blocks and still allows the system to monitor I/O, improving security, functionality, and performance.
Example of how both are applied:
# Enable merges on all blocks that have a queue, improving I/O efficiency on all devices
for i in /sys/block/*/queue; do
# Skip zRAM and other virtual devices that don't benefit from this
case "$i" in
*/zram*|*/loop*|dm-*) continue ;;
esac
lock_val "0" "$i/nomerges"
done
# Virtual/non-physical blocks do not benefit from iostats
for i in /sys/block/*/queue; do
# Skip physical blocks that can benefit from iostats
case "$i" in
mmcblk*|sd-*) continue ;;
esac
lock_val "0" "$i/iostats"
done