5

What could be writing on the disk that iotop does not show?

# iotop -a
Total DISK READ: 8.19 M/s | Total ****DISK WRITE: 3.34 M/s****
  TID  PRIO  USER     DISK READ DISK WRITE>  SWAPIN      IO    COMMAND
  428 be/4 root          0.00 B     84.00 K  0.00 %  0.02 % [kjournald]
 2600 be/3 root          0.00 B      8.00 K  0.00 %  0.01 % auditd -s disable
 2582 be/4 root          0.00 B      4.00 K  0.00 %  0.00 % syslog-ng

(iotop is NOT run using -o)

How do you interpret this?

# iostat
Linux 3.0.51-0.7.9-default (x)   03/10/13        _x86_64_

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
       1.08    0.00    1.33    5.27    0.00   92.32

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda               5.10       173.02        14.35  824994560   68417967
sdb              79.08      1028.23      1018.19 4902923384 4855045168
sr0               0.00         0.00         0.00        988          0
dm-0            175.34      1028.23      1018.19 4902916232 4855045168
1
  • UPDATE An important detail that I forgot to say that this is Novell's NSS filesystem. This filesystem has compression features. What we see here may be things getting decompressed on read for example! – Marki Dec 4 '14 at 10:12
1

I was wondering about the difference between the 'Total DISK WRITE' and the 'Actual DISK WRITE'. Running iotop -a shows the actual disc write. If you write sth. to the disc the kernel can cache these writes for you (I think that was what vonbrand meant). You can check if there are some dirty pages that need to be written to the disc using: cat /proc/vmstat | egrep "dirty|writeback" [0]. If nr_dirty > 0, then there are some pages that need to be written to the disc.

In your case only the actual read/write speeds are shown. And the processes had already finished the writing, but the changes have not been written to the disc, yet. The kernel was currently doing this, when you had the look at iotop. You do not see a process writing, but you see that there is data been written to the disc.

That's also the reason why sometimes the two values (total read/write and actual read/write) at the top of iotop are not equal.

[0] https://lonesysadmin.net/2013/12/22/better-linux-disk-caching-performance-vm-dirty_ratio/

-2

For performance, reads are critical (someone is waiting for the requested data), writes can be postponed without ill efects (as long as they get to the disk before the system goes down, obviously). If the machine has plenty of memory free, "no much writes" is to be expected.

1
  • I don't think you understood the question. It is: how can it be that at the top of iostat you see writes, while in the process list just below that output it shows no writes? – Marki Mar 24 '13 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.