I'm a developer but still learning about Linux, hosting, and CPU performance. I'm currently running a PostgreSQL database on a dedicated server (AX102 from Hetzner) equipped with an AMD Ryzen 9 7950X3D. My goal is to match the query execution speed I experience locally with the same application. Despite expectations, the query execution times on my server are significantly slower than on my local machine.
For context, I previously tested queries on an i9-13900 with a 3GHz base speed and observed 33% slower performance on a VPS with 2GHz CPUs. I chose the AX102 based on its 4.2GHz base speed, but now I'm facing a situation where the queries are 100% slower than on my local machine.
I've noticed that the CPU frequency fluctuates between 500MHz and 5GHz while monitoring with 'watch -n 1 "grep MHz /proc/cpuinfo"'. Unlike my local system and other VPS setups, the performance isn't stable. I've disabled power-saving mode and switched to performance mode, but I'm still looking for advice on how to achieve a consistent CPU speed and optimize my database performance. Any tips would be appreciated!
3 Answers
It's interesting that you’re getting worse performance on the 7950X3D compared to the 13900K. Benchmark tests show that the 13900K actually outperforms the 7950X3D in many SQL workloads. It could also be an issue with data transfer between chiplets in the 7950X3D design. It’s a dual chiplet structure, and that can slow things down if data needs to be passed between them. Maybe you should consider testing with a different CPU or optimizing your data queries further to mitigate the delays.
Did you verify if the CPU governor settings are adjusted correctly? You mentioned changing it to performance mode, which is good, but it's worth double-checking that the setting is applied properly across your system. Sometimes these settings don’t take effect after changes. Also, remember that RAM speed can impact performance, especially with the ECC RAM offered by Hetzner. Have you looked into that aspect? It might be running slower compared to your local setup.
It's true that clock speed plays a role, but architecture and other factors are just as important. Your Ryzen 9 7950X3D is a robust CPU, especially given that it's paired with 128GB of DDR5 RAM and dual PCIe4 NVMe SSDs. However, if your CPU is downcloaking to save power when idle, you might not see the performance you expect. Make sure you are directly logged in (SSH) to see real performance impacts. Also, have you considered adjusting your Docker Compose settings to better align with your specific system needs? A general configuration might not work as well for a dedicated server setup.
Yeah, I'm SSH'd in, but what I really care about is query execution time and it seems so steady! I throttle the CPU, and the execution time reflects that directly. It looks like the Intel systems are just more stable in this regard. I've reached out to support for help, but I'm still confused about the power settings.
I've switched it to performance, so it should be good. I read that the RAM speed might be slower, but I never thought it would make that much of a difference. Got to dive deeper into the specs!