-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lift 16 Thread limit for Ryzen and future Processors #26
Comments
Unfortunately browsers aren't quite ready for this, with restrictions on the number of web workers for threads and allocated memory. (And it does make some sense that vendors are careful, not allowing random websites to allocate 4GB of RAM and run extremely CPU intensive tasks.) Will raise the limits, when it becomes possible in mainstream browsers. A browser extension to make native Stockfish available might be a good approach, though: lichess-org/lila#7909 |
@niklasf @apetresc |
Ok, I guess we can consider it a bit more carefully. Is there a way to feature test that, rather than checking browser versions? What's The memory limit is harder. 4 GiB is the maximum for wasm32, but we can't use all memory for hashtables. So 2 GiB would be the only feasible power of two. But even for that, it's not clear, that there will always be I continguous slice of 2 GiB available, especially when resizing the hashtable. |
Oh, also let's not forget about the memory overhead of threads. Extrapolating #4 (comment), we'd need more than 1 GiB of memory for threads alone. A mitigating factor is that someone with 64 threads will very likely also have a bit of RAM to go with it. |
Memory is not the issue. Going in hashtable size from 1 to 4GiB does not yield great increase so 1gb is ok i think. (only few percentage after 256mb in my experience) [16 Cores] AMD Ryzen 9 5950X [12 Cores] AMD Ryzen 9 3900X I think you could savely allow up to navigator.hardwareConcurrency for stockfish.wasm - chess scales very well with cores |
Oh, that's great! I was expecting Firefox to give 32 or 64, and then fail when allocating more than 20. |
Increase to 32 published as v0.9.1, and deployed to the Lichess testing site https://lichess.dev/analysis (via lichess-org/lila@2703beb). Can you please confirm that it works in Chrome and Firefox? |
The 1gb and 16 thread limit is really bad compared to native stockfish-avx performance.
On Ryzen and future intel processors (anything above 8 cores) you lose speed.
So i would suggest setting threadpool size up to 64 threads. (This will yield +100% nps)
I dont know if 1GB is a hard limit but i would suggest 4GB. (This probably will yield +5%)
stockfish.wasm is currently limiting analysis performance on lichess.org.
The text was updated successfully, but these errors were encountered: