how to parallel run PC1 faster
Closed this issue · 3 comments
Due to the random arrival of sector tasks, it may not be feasible for one machine to use a single thread to run multiple sectors simultaneously. Therefore, there is a need to use different threads or processes to run the PC1 tasks. However, in actual tests, using two threads where each thread runs two sectors took almost half the time compared to a single thread running four sectors. How should we deal with this need?
We currently support either 2 or 4 sectors per thread. For overall throughput it's preferable to use 4 sectors per thread on zen3+, 2 sectors per thread for zen2. If you're looking to optimize toward for latency then enabling 2 sectors per thread on zen3+ will reduce the pc1 time to a little over half what you see with 4 sectors, provided there are sufficient iOPs.
It should also be noted that each pc1 thread will require the full set of iOPs. As a result running multiple pc1 threads would often/usually not be beneficial as it would overwhelm the NVMe drives.
By the way, by "pc1 thread" I mean if you were to run independent instances of pc1 within the process, each with multiple hashing threads. Running multiple simultaneous pc1 processes is not supported since SPDK does not like to share the NVMe drives across processes.
Got it,thanks.