machinelearning icon indicating copy to clipboard operation
machinelearning copied to clipboard

Inconsistency for Num threads calculation if they don't specified

Open Ivanidzo4ka opened this issue 8 years ago • 2 comments

We have few places in code with code like:

_threads = Math.Max(1, args.Threads ?? (Environment.ProcessorCount / 2));

in some places it's Math.Max(2, Environment.ProcessorCount - 1)

in others it'sArgs.NumThreads ?? Environment.ProcessorCount;

which is a bit strange. It's either half of cores, all cores, or we left one core to be free. KMeans, SdcaRegression, LinearClassifier , and BinaryLoader use half of available cores which leads to 50% CPU utilization. @TomFinley, @GalOshri , @glebuk

Ivanidzo4ka avatar May 23 '18 20:05 Ivanidzo4ka

@Ivanidzo4ka i think this issue still needs discussion to define what the fix should be. I added need-info tag for now (feel free to revert)

@eerhardt @TomFinley @Zruty0 could you please discuss a concrete action path for this issue so it can be fixed? Thanks.

shmoradims avatar Nov 28 '18 22:11 shmoradims

triage: we will investigate if there is a reason to have the same thread counts everywhere

rosebyte avatar Sep 09 '26 09:09 rosebyte