Jens Axboe, the creator of io_uring and the CFQ, Deadline, and Noop I/O schedulers, has continued his experiments with I/O optimization in the Linux kernel. This time, he focused on the BFQ and mq-deadline I/O schedulers, which turned out to be bottlenecks, at least in the case of high-speed NVMe drives.
The study revealed that one of the key reasons for suboptimal performance in the I/O scheduler subsystem was issues with lock contention—attempts to acquire a lock held by another thread. Through measures aimed at reducing lock contention, such as dispatch serialization and request queuing, the performance of the schedulers increased dramatically in several situations (in IOPS).
When testing the BFQ scheduler using the fio utility, performance increased from 567K to 1551K I/O operations per second, and lock contention dropped from 96% to 30%. In the case of mq-deadline, performance after applying the proposed patches with NVMe storage rose from 1070K to 2560K I/O operations per second (IOPS), and lock contention decreased from 94% to 23%.
Source: opennet.ru
