Changed default number of threads and added auto
value.
Changed default number of threads to 1 instead of autoconfigured value and added a new `auto` variable which enables autoconfiguration of thread count. The number of threads used when autoconfiguratio fails was changed from 4 to 1. The default value of using N threads where N is the number of CPU cores was not optimal as the possibility of rescheduling was higher the more utility threads there were. Due to this, N-1 is deemed to be the better autoconfigured value for thread count.
This commit is contained in:
@ -237,8 +237,8 @@ long get_processor_count()
|
||||
#ifdef _SC_NPROCESSORS_ONLN
|
||||
if ((processors = sysconf(_SC_NPROCESSORS_ONLN)) <= 0)
|
||||
{
|
||||
MXS_WARNING("Unable to establish the number of available cores. Defaulting to 4.");
|
||||
processors = 4;
|
||||
MXS_WARNING("Unable to establish the number of available cores. Defaulting to 1.");
|
||||
processors = 1;
|
||||
}
|
||||
#else
|
||||
#error _SC_NPROCESSORS_ONLN not available.
|
||||
|
Reference in New Issue
Block a user