Hi,
I’m running an online judge on the CPU-optimized server. I have 4 judges, each judge is running with 2 different vCPUs (I assign the CPUs via Docker)
I noticed that if more than one of them is judging, their judging time will increase about 10~30% (compare to when there is only one of them is running). Also, note that the judging process usually raises the CPU consumption to 100% for 30~60 seconds.
I know that Dedicated CPUs are still hyperthread(s), that is why I assign 2 vCPUs for each judge (so I think 2 vCPU is on the same physical CPU core, correct me if I’m wrong). However, I expected that the judging time should be consistent.
So I wonder, does the Dedicated CPUs run slower if others CPUs are on heavy load?
Because the online judge should not yield inconsistent results, how can I make the CPUs yield consistent run time?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Dedicated CPUs with DigitalOcean should not slow down under heavy load. However, there could be several factors that could lead to such a situation. The Docker’s CPU share management or the nature of your workloads might be leading to inconsistent results.
When multiple processes are running and competing for CPU time, the CPU scheduler will need to divide the available CPU time among them. This can lead to varying execution times. Therefore, for consistent results, consider isolating your judge instances as much as possible. You could try running each judge on its own Droplet, or adjusting your Docker CPU assignment.
If you’re still interested in diving deeper into Docker’s CPU management, here’s a Docker’s resource management guide.
To better understand CPU-optimized droplets, have a look at the official DigitalOcean Droplets documentation.
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.