Why Is Disk IOWait Spiking on Storm Nodes? Uncover kjournald, pdflush and Tuning Tips
This article investigates intermittent disk IOWait spikes on Storm machines, identifies the kjournald and pdflush processes as primary contributors, explains ext3 journaling modes, and offers practical mount‑option tweaks like adding noatime to improve disk performance.
Recently in production, real‑time Storm machines have shown intermittent spikes in disk IOWait. Storm processes data in memory, so disk I/O is limited to topology logs, and no other applications run on the nodes, prompting investigation into which processes are consuming disk I/O.
1. iotop
Running iotop reveals that the kjournald process consumes the most I/O resources, with several Java processes also contributing.
2. Inspecting /proc
cut -d " " -f 1,2,42/*/proc | sort -n -k +3Sample output shows high I/O usage by kjournald (about 10% of I/O) and significant writes from pdflush:
1720(kjournald) 60460112
pdflush 31551
...3. ext3 System Journaling
The kjournald daemon handles ext3 filesystem journaling. ext3 supports three journal modes:
journal : records both file data and metadata updates.
ordered (default): records only metadata updates and forces the log to be written before the metadata changes are committed.
writeback : records only metadata updates without forcing a write before the metadata change; the actual write timing depends on the OS flushing dirty pages.
4. pdflush and kswapd Daemons
pdflush synchronizes memory data to disk, writing dirty pages to ensure consistency between RAM and storage. kswapd manages memory, waking periodically to check for low free pages and releasing pages in batches when thresholds pages_low and pages_high are crossed.
5. Root Causes of IOWait
ext3 journaling (kjournald) generates a large amount of log data that must be flushed to disk by pdflush.
The filesystem is mounted with the default ordered mode and default mount options, offering no performance optimizations.
Relevant /etc/fstab entry:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 26. Disk Mount‑Option Optimization
Adding the noatime (or omitting nodiratime) mount option can improve disk read/write performance by 5‑10%.
LABEL=/ / ext3 defaults,noatime 1 1Source: http://mdba.cn/2015/04/06/如何查找iowait元凶/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
