Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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.
Thank you
KyawShein-ai
1f0a3e2f451d41bc80281dd5e023bb
a04264cdb056466eab7c4fca66fe65
aehsan4004
Darshan Hiranandani
14e850cb773b484193b0e034669289
0d46685ff370452cb0d5923fa4beeb
8c7a1db8c1af48f2816f2ab00c79c4
allen7u
4029567daede4037840eb514185d21
mfs