I made a lot of changes on my server, database, and the queries my server makes to that database (too many to know where the issue is). The changes have brought my DO app’s performance to a crawl. The server’s CPU is through the roof. I suspect the issue is because the connected Postgresql throughput has plummeted.
I’ve tried to setup 3rd party tools like datadog before but I couldn’t get them to work after a week so I gave up.
My queries are very fast locally, so I’m not sure what these metrics mean. My DB cache his rate is between 99% - 100%, load average is ~0.5, CPU is 22%, and Index vs Sequential Scans is 98.9%. I’m struggling to find resources to explain these metrics in-depth.
Thanks.
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.
Hey there!
First, let’s tackle your specific questions:
Rows Fetched vs Rows Read: Think of Rows Read as all the data your database looks at, while Rows Fetched is what it actually sends back to your app. It’s like scanning a whole book (Rows Read) but only copying a few pages (Rows Fetched).
Is a higher Rows Fetched to Rows Read ratio better? Generally, yes! It means your queries are more efficient, like finding exactly what you need in that book without flipping through every page.
Best practices for database fetching:
Is it the server or the database? Good question! To figure this out:
Now, looking at your metrics, that high cache hit rate and low load average suggest your database might not be the main culprit. The high server CPU usage points more towards an application issue.
Here’s what I’d suggest:
If you’re still stuck, don’t be afraid to roll back some changes temporarily. It might help you pinpoint what’s causing the slowdown.
- Bobby