lichess.org

Analysis CPU count stuck below possible limit

Hi,

I have an AMD CPU (Ryzen 2700x) with 8 cores. Previously when using the analysis tool I could put the CPU slider to "8/4" cores. However, I once changed this just to see what would happen, and it's now stuck at a maximum of 4 cores.

For reference, my peak knodes/sec with 8/4 was roughly 12 000 with PNACL, and is now around 5- 6 000, so I know it's not just a visual bug.

Is this intended, am I doing something wrong, or what's going on here?

I can max. enable 3 cores.
My system is an old amd cpu with 4 cores and Linux and newest Chromium Browser (uses WASMX not PNACL)
We need more data to limit this problem. What are your results, random readers?

WASMX is currently hard limited to max 4 threads.
Normally you would expect supported number of treads -1. So with 4 threads, you'll have 3 available for analysis and one reserved for the system.

@ChrisWasTaken
Can you try this?:

Copy-paste following line into your chrome browser address bar:
chrome://flags/#enable-webassembly-threads

Then set the first option [WebAssembly threads support] to DISABLE
Restart browser and test lichess analysis.
Still the same result?


#5 Yep you are right. For some reasons 4 threads is limit with WASMX at the
moment:
if (max > 4 && ceval.wasmxSupported) max = 4; // hard limit for now

if (max > 2) max--; // don't overload your computer, you dummy
And this is thread reduction line, but if you have 1 or 2 thread cpu only comp will
get overloaded ;-)

source:
github.com/ornicar/lila/blob/da3a6af82c8cea46b1911fab3f1390407b15b23e/ui/analyse/src/actionMenu.ts#L215

@kettwiesel
It worked! It even shows all the logical cores this time -1, so I can choose up to 15 cores now, and knode count is up to >11 000.

Thanks a lot for the help!

@ChrisWasTaken
My pleasure, but it is only a testing solution. I have no clue about possible side
effects on other webpages.


I guess the reason for the behaviour is that
browser reports now WASMX (WebAssemblyX) support and PNACL support.
In the lichess code line
if (max > 4 && ceval.wasmxSupported) max = 4; // hard limit for now
the max. thread count is limited to 4, even if PNACL will be used.
@revoof
@thibault
Is this a glitch in lichess code or is this intended for some reasons?

Unfortunately the limit for WASMX is required for now*, but there as a bug that also applied it for PNaCl. This is fixed now, and I recommend setting your flags back to the default.

*) There is currently no way to reserve more memory at runtime, so we need to go for the lowest common denominator. Chrome devs are working on it.

Reconnecting