A Linux server that hosts a busy PostgreSQL instance is experiencing very slow query performance during peak traffic. You run top and observe a high I/O wait percentage (%wa) and a load average that rises well above the number of cores. A follow-up check with iostat -x 1 5 shows %util near 100% and an avgqu-sz that frequently exceeds 90 for the only block device, an enterprise-grade SSD. Without changing application code or replacing hardware, which action is most likely to lower the high I/O wait time and improve overall responsiveness?
Change the block device's I/O scheduler from CFQ to mq-deadline or none, both recommended for fast SSDs.
Disable TCP segmentation and generic offloading features on the network interface.
Lower the PostgreSQL shared_buffers setting to reduce memory usage.
Increase the kernel's swappiness value so the system begins swapping sooner.
The combination of a high I/O wait (%wa) with a high load average indicates that processes are waiting on storage, not the CPU. This is confirmed by the iostat output, where %util near 100% and a very large avgqu-sz (average queue size) show that the storage device is saturated. On older Linux systems, the default I/O scheduler was often CFQ (Completely Fair Queuing), which is optimized for spinning disks and can add unnecessary overhead on fast SSDs. Modern schedulers like mq-deadline or none are better suited for solid-state storage. They remove complex re-ordering logic, shortening the path through the kernel block layer, which can significantly reduce I/O wait time and improve responsiveness.
The other options do not target the storage bottleneck: increasing swappiness would generate more disk I/O, worsening the issue; lowering PostgreSQL's shared_buffers reduces its memory cache, forcing more disk reads; and disabling network offloading affects NIC processing, not disk latency. Therefore, changing the I/O scheduler is the most effective remediation in this scenario.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does changing the I/O scheduler to `mq-deadline` or `none` do for SSDs?
Open an interactive chat with Bash
What do `%util` and `avgqu-sz` in `iostat` indicate about storage performance?
Open an interactive chat with Bash
Why is CFQ less suitable for use with SSDs?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Troubleshooting
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access