monero icon indicating copy to clipboard operation
monero copied to clipboard

Second thread pool for I/O [release]

Open SChernykh opened this issue 1 year ago • 0 comments

This is a copy of #8576 for the release-v0.18 branch

monerod currently uses a single thread pool for everything, including DNS requests. If it runs on a low-end CPU (less than 8 threads), DNS requests can block incoming transactions handling entirely. This change fixes it by never mixing compute and I/O tasks. I/O thread pool has a fixed size of 8 threads because monerod never does more than 7 parallel DNS requests as far as I can see in the code. Also, 8 I/O threads will process all DNS requests in parallel on low-end CPUs whereas they were processed consecutively before.

SChernykh avatar Sep 20 '22 08:09 SChernykh