Question

Choosing CPU level

Hi, I am running a basic droplet that caps out at 100% CPU for 3 hours a day (if it doesn’t lock up) when running a data analysis script.

It’s a bunch of scripts that run to analyze data and put it into a database to be served by Django. My command line scripts can’t be asyncio and single threaded anyway.

A dedicated CPU is a bit out of the price range we’re willing to spend but will upgrading to 2 vCPUs alleviate the CPU usage by allowing the PostgreSQL DBMS back end for the IO processing in a separate process?

I’m not sure I’m asking this correctly, but I believe my next option up I believe is 2 vCPU but my script itself can’t take advantage as it’s a single threaded application. I’m hoping that every time it writes to the DBMS at least some of that CPU load will be absorbed by the 2nd vCPU. Am I correct to assume this?

Serving the web pages itself is fine and doesn’t cause a problem.


Submit an answer
Answer a question...

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
April 22, 2022

Hi @driftinggreenblueship,

Yes, you are correct in assuming this. Even if your application is a single-threaded one, other services will still be able to use the second CPU.

Another suggestion I could give you is to add a SWAP file, 1GB should be enough for your needs.