Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reactor, linux-aio: recommend CPU count reduction, too
When the system can satisfy the AIO requirements by reducing the network IOCBs count, don't only recommend increasing "aio-max-nr" for meeting the network IOCBs count, but also advise a suitable reduction of CPUs. The warning remains unchanged with "aio-max-nr=32768" and "--smp=8", for example -- even with a single CPU, the ideal AIO count is 51026: > DEBUG seastar - Intended AIO control block usage: > DEBUG seastar - > DEBUG seastar - purpose per cpu all 8 cpus > DEBUG seastar - ------- ------- ---------- > DEBUG seastar - reserve 0 > DEBUG seastar - storage 1024 8192 > DEBUG seastar - preempt 2 16 > DEBUG seastar - network 50000 400000 > DEBUG seastar - ------- ------- ---------- > DEBUG seastar - total 51026 408208 > DEBUG seastar - > DEBUG seastar - Available AIO control blocks = aio-max-nr - aio-nr = > 32768 - 0 = 32768 > WARN seastar - Your system does not have enough AIO capacity for > optimal network performance; reducing > `max-networking-io-control-blocks'. > WARN seastar - Resultant AIO control block usage: > WARN seastar - > WARN seastar - purpose per cpu all 8 cpus > WARN seastar - ------- ------- ---------- > WARN seastar - reserve 0 > WARN seastar - storage 1024 8192 > WARN seastar - preempt 2 16 > WARN seastar - network 3070 24560 > WARN seastar - ------- ------- ---------- > WARN seastar - total 4096 32768 > WARN seastar - > WARN seastar - For optimal network performance, set > /proc/sys/fs/aio-max-nr to at least 408208. The new hint is included with "aio-max-nr=200000" and "--smp=8", for example: > DEBUG seastar - Intended AIO control block usage: > DEBUG seastar - > DEBUG seastar - purpose per cpu all 8 cpus > DEBUG seastar - ------- ------- ---------- > DEBUG seastar - reserve 0 > DEBUG seastar - storage 1024 8192 > DEBUG seastar - preempt 2 16 > DEBUG seastar - network 50000 400000 > DEBUG seastar - ------- ------- ---------- > DEBUG seastar - total 51026 408208 > DEBUG seastar - > DEBUG seastar - Available AIO control blocks = aio-max-nr - aio-nr = > 200000 - 0 = 200000 > WARN seastar - Your system does not have enough AIO capacity for > optimal network performance; reducing > `max-networking-io-control-blocks'. > WARN seastar - Resultant AIO control block usage: > WARN seastar - > WARN seastar - purpose per cpu all 8 cpus > WARN seastar - ------- ------- ---------- > WARN seastar - reserve 0 > WARN seastar - storage 1024 8192 > WARN seastar - preempt 2 16 > WARN seastar - network 23974 191792 > WARN seastar - ------- ------- ---------- > WARN seastar - total 25000 200000 > WARN seastar - > WARN seastar - For optimal network performance, set > /proc/sys/fs/aio-max-nr to at least 408208, or > decrease the logical CPU count of the application to > 3. And then with "aio-max-nr=200000" and "--smp=3", the whole warning disappears: > DEBUG seastar - Intended AIO control block usage: > DEBUG seastar - > DEBUG seastar - purpose per cpu all 3 cpus > DEBUG seastar - ------- ------- ---------- > DEBUG seastar - reserve 0 > DEBUG seastar - storage 1024 3072 > DEBUG seastar - preempt 2 6 > DEBUG seastar - network 50000 150000 > DEBUG seastar - ------- ------- ---------- > DEBUG seastar - total 51026 153078 > DEBUG seastar - > DEBUG seastar - Available AIO control blocks = aio-max-nr - aio-nr = > 200000 - 0 = 200000 Signed-off-by: Laszlo Ersek <[email protected]>
- Loading branch information