lichess.org
Donate

Analysis CPU count stuck below possible limit

<Comment deleted by user>
<Comment deleted by user>
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
<Comment deleted by user>
@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.

This topic has been archived and can no longer be replied to.