-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Determine the thread pool size based on the physical CPU #191
Comments
I found out that it is hard to get the physical CPU number and hyperthreading data without parsing CPU information by the programmer. It would be a lot of easier if we just modify |
The original design has contradiction. It uses almost all the logical processors for a single PoW, but allows dcurl to handle 2 PoW at the same time based on the hyper-threading. The new function is added in cpu-utils.h to detect the thread number per physical processor, which also shows whether the hyper-threading is enabled or not. Once we know the status of hyper-threading, we can determine the threadpool size and the thread number for a single PoW. Close DLTcollab#191.
The original design has contradiction. It uses almost all the logical processors for a single PoW, but allows dcurl to handle 2 PoW at the same time based on the hyper-threading. The new function is added in cpu-utils.h to detect the thread number per physical processor, which also shows whether the hyper-threading is enabled or not. Once we know the status of hyper-threading, we can determine the threadpool size and the thread number for a single PoW. Close DLTcollab#191.
The original design has contradiction. It uses almost all the logical processors for a single PoW, but allows dcurl to handle 2 PoW at the same time based on the hyper-threading. The new function is added in cpu-utils.h to detect the thread number per physical processor, which also shows whether the hyper-threading is enabled or not. Once we know the status of hyper-threading, we can determine the threadpool size and the thread number for a single PoW. Close DLTcollab#191.
The
dcurl
before and after integrating the thread pool uses the (maximum logical CPU - 1) as the number of threads for a single PoW.However,
dcurl
also allows calculating 2 PoW at the same time, which is the number of threads per core.And the number of
logical CPU
is equal to the number ofphysical CPU * threads per core
.Before integrating the thread pool,
dcurl
may create the threads as many as the twice number of the logical CPU.After integrating the thread pool,
dcurl
set the pool size as (maximum logical CPU - 1).And it causes the PoW to wait for the threads returning from the previous PoW.
Goal:
The text was updated successfully, but these errors were encountered: