By Nam Nguyen
Hi Digital Ocean team, I am writing to bring to your attention an issue I’ve encountered with our managed Postgres DB instance, specifically regarding its connection pool (22/47). Initially, the database was provisioned with a configuration of 1vCPU and 2GB RAM.
However, it became apparent that this setup was insufficient to adequately serve our application’s needs. Consequently, we upgraded the instance to 2vCPU/4GB RAM in an attempt to improve performance.
Unfortunately, rather than experiencing the desired enhancement, we observed a significant slowdown in performance, with a notable decrease of approximately 50%. For instance, a basic select query that previously took 8 seconds to complete now requires substantially more time.
Given the critical nature of this issue and its impact on our operations, I kindly request your immediate assistance in resolving it. Any insights, recommendations, or actions you can provide to optimize the performance of our Postgres DB instance would be greatly appreciated.
Thank you for your prompt attention to this matter.
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!
Hey @namnguyenshrimp,
I’m sorry to hear about the performance issues you’re experiencing with your upgraded Postgres instance. It’s quite perplexing to encounter a slowdown after upgrading to a seemingly more robust configuration.
Please reach out to our amazing support team who will be more than happy to assist you with your issue! :)
Besides that, here are some general tips on how to troubleshoot such performance issues:
Use EXPLAIN or EXPLAIN ANALYZE on your slow queries to understand if and how their execution plans have changed following the upgrade. It’s possible that the instance resizing led to changes in the query planner’s behavior.
Check if all your indexes are intact and consider reindexing if necessary. Also, ensure that auto-vacuuming is properly configured and running as expected, as this can impact performance.
Monitor the CPU, memory, and I/O usage of your new instance. Compare these metrics to those from before the upgrade. This can help identify any new bottlenecks.
Look for any locking issues or increased block reads/writes that might be contributing to the slowdown. Long-running locks, in particular, can severely impact performance.
If your application’s usage pattern has changed around the time of the upgrade (e.g., more concurrent connections or different types of queries), it might contribute to the observed performance issues.
Review application logs for errors or warnings that may indicate issues with database interactions.
Hope that helps!
- Bobby.
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.