public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean-Luc Fontaine <jfontain@free.fr>
To: linux-kernel@vger.kernel.org
Subject: /proc/partitions statistics question
Date: Tue, 16 Dec 2003 20:35:06 +0100	[thread overview]
Message-ID: <3FDF5E6A.7010201@free.fr> (raw)

I have been trying to make sense of the units used in the 
/proc/partitions statistics.
I thought read and write I/O were in kilobytes, but not according to the 
following test on my 2.4.3 kernel machine:

# /proc/partitions columns:
# major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse 
running use aveq

$ fgrep hdb1 /proc/partitions
$ dd if=/dev/zero of=ttt bs=1M count=1024 2>/dev/null
$ sync; sync; sync
$ fgrep hdb1 /proc/partitions
    3    65   40209088 hdb1 7107 18180 202278 384530 7925 19005 215616 
215330 0 46240 599860
    3    65   40209088 hdb1 7134 18218 202798 386510 24566 265384 
2319776 2977060 0 102000 3363570
$ ls -lk ttt
-rw-r--r--    1 root     root      1048576 Dec 13 15:56 ttt
$ fgrep hdb1 /proc/partitions
$ dd if=ttt of=/dev/null 2>/dev/null
$ sync; sync; sync
$ fgrep hdb1 /proc/partitions
    3    65   40209088 hdb1 7152 18222 202974 386650 24581 265397 
2320000 2977060 0 102140 3363710
    3    65   40209088 hdb1 23567 263977 2300334 555980 24668 265441 
2321048 2978280 0 171380 3534260

(24566 - 7925) = 16641 were written, whereas
(23567 - 7152) = 16415 were read
I would have expected something near 1048576 (kilobytes),
but the results seem to be roughly 64 times less...

I would really appreciate an explanation, as I use those statistics
in a monitoring program and for filesystems performance tests.

Many thanks for your help!

-- 
Jean-Luc Fontaine  mailto:jfontain@free.fr  http://jfontain.free.fr/

             reply	other threads:[~2003-12-16 19:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-16 19:35 Jean-Luc Fontaine [this message]
2003-12-16 20:37 ` /proc/partitions statistics question Mike Fedyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FDF5E6A.7010201@free.fr \
    --to=jfontain@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox