I am a Python developer, hosting a Flask application on a DO droplet. I am new to cloud hosting so I am learning as I go and have a question / looking for direction.
I have a simple python script that runs some calculations, and updates an SQLite database. Locally on my macbook it takes ~23 seconds. Running it on my DO droplet, it takes ~222 seconds.
I recently migrated my code to a new DO droplet, I don’t remember the previous droplet being this slow.
This droplet is I believe a shared CPU, Regular 80 gb SSD hdd, 4 gb ram, 2 cpus. It’s running Ubuntu 22.04 and Python 3.10.
I can’t find what the previous droplet was, but it was created when the cheapest option was $5/month for 1 gb / 1 CPU.
What is likely causing this script to be this much slower on my droplet? I know the CPU is not running at 100%.
What can I do to speed it up, at least to the same speed as my desktop? I don’t want to start blindly resizing my droplet.
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!
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.