-
Notifications
You must be signed in to change notification settings - Fork 5
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
Concurrency and CPU usage #3
Comments
Does this happen when using stockfish? |
SF runs okay (so far) with 60 concurrency, but it puts much less load on the CPU. 18% at concurrency 60. But still shows the spike demand at the end of each game cycle (each budget) to about 44% |
Because the memory and CPU demand spikes (doubling) happen at the end of each budget, I wonder if you're closing all engines out, and then opening them up again, such that there's overlap? New invocations opening before the old invocations are finished off with ending? That might account for the doubling. |
Only after each budget engines are restarted. |
What time control or depth did you use for this test?
After a budget all engines are quitted. Then its time for nevergrad to update the params. I will try to add a log to measure the cpu and ram usage and time elapsed when nevergrad is updating its thing. |
Giving back memory from many processes may be taking time? |
Created a branch https://github.com/fsmosca/Lakas/tree/more_logging You need psutil for this. It will log to match_lakas.txt for the usage of cpu when nevergrad updates its data. sample: Initial:
Using stockfish with concurrency 6 on my 4-core/8-thread PC, optimizer uses around 12% of python alone. In my other tests it reached 25%, this is the highest I observed. Note match_lakas.txt can get very big as it logs the engine output from cutechess-cli. Later I will log the memory used. |
That is possible, I am working on logging memory usage.
cutechess-cli has I will add it as an option later. Or you can modify the code at Line 299 in 1c5201e
Just add |
The
There is new v0.25.0 featuring movetime. Example: |
--move-time-ms 10 seems to work (budget about twice as fast as with move-time-ms 25). the default wait (code looks like it defaults to 5000 ms, if I read it correct) doesn't help with the CPU load, which is still doubling at the end of each budget. it may be that I am just being too careless with RAM usage (256 Gb available, makes you lazy). When a process is ended, it has to clear the RAM it gives back (windows security reasons), so overlap exit-start, is going to have cores=concurrency x 2 with that many cores busy nulling out RAM given back. No doubt the RAM is segmented all over the place by concurrent starts. |
Yes default wait is 5000 ms in lakas. I will also try to log the cpu usage of all the process ids running.
From cutechess: Looks like:
Don't know what it is doing after. I will update the branch and log the cpu and mem usage of cutechess. What happened if you try to increase the wait like 10s. |
Master is now updated with some changes including that of more logging branch. |
Maybe related to a known issue of cutechess: cutechess/cutechess#630 |
Testing using AMD with 64 cores.
If run at concurrency 50, works for a budget or two then gives 'game incomplete' fail.
Same situation concurrency at 40, 30.
Concurrency 20 works (so far).
Observing the CPU usage, there's a demand spike at the end of each game run (one budget), which for concurrency 30, 40, 50 takes CPU usage to 100% and the system gets its knickers in a twist and starts reporting fails.
At concurrency 20. CPU usage is 44%, 255 processes, 3372 threads, and 79Gb RAM in use.
At the end of each game run (one budget), CPU usage doubles to 80%, processes to 333, threads to 3590 and RAM to 131 GB. I'm getting away with concurrency 20, so far.
Guessing here, but it looks like, at the end of each budget for some reason, it fires up both master and test engines (2x20) and does some processing, using 40(?) cores for a few seconds?
It fails for high concurrency, because 60, 80, 100 core fire ups are too much for it? Well, too much when using my engine.
Is there anyway to lower the increased core demand at the end of each budget?
The text was updated successfully, but these errors were encountered: