lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.76k stars 2.28k forks source link

local eval threads capped at 4 #5583

Closed isaacl closed 5 years ago

isaacl commented 5 years ago

In actionMenu.ts we have:

        if (max > 4 && ceval.wasmxSupported) max = 4; // hard limit for now

This is capping ceval threads even when pnacl is used.

Also, the default number of threads is capped at 8, but the slider is capped at 4. So my slider started at "6 / 4".

niklasf commented 5 years ago

Posting brief explanation in https://lichess.org/forum/lichess-feedback/analysis-cpu-count-stuck-below-possible-limit

isaacl commented 5 years ago

This partially fixes the issue, but also need to change the max to 8 in actionMenu.ts.

In ceval/src/ctrl.ts, cores are initially set via:

  const threads = storedProp(storageKey('ceval.threads'), Math.min(Math.ceil((navigator.hardwareConcurrency || 1) / 2), 8));

which caps cores at 8. So for a wasm user with 6 hyperthreaded cores, the slider will show '6 / 4', and once the slider is adjusted the user won't be able to adjust again.

niklasf commented 5 years ago

Ok, will fix. stockfish.wasm caps the value it receives, so at least it's only a display issue now.

niklasf commented 5 years ago

Done. There's still the case where local storage has a larger than max value when the technology or something about the hardware changed.