AWS Engineer Highlights Linux 7.0 Impact on PostgreSQL Performance, Fix Uncertain
An AWS engineer has raised concerns about Linux 7.0’s impact on PostgreSQL performance. The nearly finalized development kernel reportedly delivers around half the throughput compared to earlier versions.
AWS Engineer Reports Performance Issues with Linux 7.0
Salvatore Dipietro, an engineer from Amazon/AWS, highlighted significant throughput and latency regression in PostgreSQL. During tests on a Graviton4 server, it was discovered that Linux 7.0 results in only 51% of the throughput of its predecessors. This decrease is attributed to increased time spent in a user-space spinlock.
Identifying the Key Issues
The regression was traced back to a change in Linux 7.0. This update restricted the available preemption modes for the kernel. Previously, coverage on Phoronix indicated that Linux 7.0 would focus on full and lazy preemption models suited for contemporary CPU architectures.
- Performance decline: Linux 7.0 shows approximately 0.51x throughput of older kernels.
- Kernel changes: New preemption mode restrictions impact PostgreSQL’s functionality.
- Upcoming updates: Linux 7.0 stable is scheduled for release in two weeks.
Development Community’s Response
In response to the reported performance issues, a patch was posted to the Linux kernel mailing list. This patch aims to restore PREEMPT_NONE as the default, addressing the regression’s severity. However, it is uncertain whether this change will be incorporated.
Peter Zijlstra, the original author responsible for simplifying preemption modes, suggested an alternative fix. He recommended that PostgreSQL utilize the Restartable Sequences (RSEQ) time slice extension, which has been integrated into Linux 7.0.
Implications for PostgreSQL Users
If PostgreSQL does not adapt promptly, users may experience significant performance drops under Linux 7.0 stable. This could affect performance until updates are finalized for the popular database server. Furthermore, this kernel version will be the foundation for the upcoming Ubuntu 26.04 LTS, scheduled for release in April.
In conclusion, as Linux 7.0 approaches its stable release, the implications for PostgreSQL performance remain critical. Database administrators should stay informed about updates and potential adaptations to mitigate performance impacts.