Monitoring JFS Cache Hits per filesystem
There are a couple of AIX commands needed to monitor the effectiveness of the JFS filesystem cache.
The first is mpstat. The 'mpstat -w 2' command has two columns, min and maj, these columns tell you the number of minor and major page faults on a per logical processor, but only for file-systems reads, as writes do not cause page faults as the data to be written is already in memory.
min = Minor page faults (page faults with no IO).
maj = Major page faults (page faults with disk IO).
mpstat -w 2
cpu min maj mpc int cs ics rq mig lpa sysc us sy wa id pc %ec lcs
0 479 0 0 3122 3610 177 3 371 100.0 3890 5.0 87.8 0.0 7.2 0.39 23.0 691
1 614 0 0 1536 1854 107 0 391 100.0 1981 9.9 81.1 0.0 9.0 0.35 20.8 474
2 0 0 0 39 25 0 0 11 100.0 25 0.0 0.2 0.0 99.8 0.07 3.9 21
3 0 0 0 16 1 0 0 0 100.0 0 0.0 0.1 0.0 99.8 0.07 4.0 18
4 748 0 0 1826 2623 133 2 361 100.0 5801 5.7 85.9 0.0 8.4 0.36 21.0 398
5 476 0 0 2284 2786 115 0 391 100.0 3009 6.3 81.7 0.0 12.0 0.31 18.2 567
6 0 0 0 14 0 0 0 0 100.0 0 0.1 0.0 0.1 99.9 0.07 4.4 17
7 616 0 0 107 1 0 0 3 100.0 1638 3.5 17.2 0.0 79.3 0.09 5.2 107
ALL 2933 0 0 8944 10900 532 5 1528 100.0 16344 5.7 70.6 0.0 23.7 1.71 213.5 2293
iostat -F /export 4
System configuration: lcpu=8 ent=2.00 fs=21
FS Name: % tm_act Kbps tps Kb_read Kb_wrtn time
/export - 173123.0 43280.8 692492 0 08:01:28
/export - 162620.2 40655.2 650480 0 08:01:32
/export - 145422.0 36355.5 581688 0 08:01:36
/export - 171614.2 42903.8 686456 0 08:01:40
If you compare the IO rates for Kb_read against the iostat -DR command, you get the effectiveness of your JFS2 cache.
In the following example, we see zero disk IO, therefore all those filesystem reads are coming from the JFS2 cache.
iostat -DRT hdiskpower0 4
System configuration: lcpu=8 drives=602 paths=4 vdisks=2
hdiskpower0 xfer: %tm_act bps tps bread bwrtn time
0.0 0.0 0.0 0.0 0.0 08:01:28
0.0 0.0 0.0 0.0 0.0 08:01:32
0.0 0.0 0.0 0.0 0.0 08:01:36
0.0 0.0 0.0 0.0 0.0 08:01:40
Whereas in the following example, the reads are coming from the disk.
You see the bread column from iostat -DR is non-zero, so data is read from the disk.
FS Name: % tm_act Kbps tps Kb_read Kb_wrtn time
/export - 2666.9 755.2 10667 0 12:37:36
/export - 2135.5 724.5 8542 0 12:37:40
/export - 2220.0 727.2 8879 0 12:37:44
/export - 412.3 114.8 1649 0 12:37:48
hdiskpower0 xfer: %tm_act bps tps bread bwrtn time
25.5 2.7M 137.2 2.7M 0.0 12:37:35
21.5 3.0M 358.5 3.0M 0.0 12:37:39
24.0 3.5M 330.5 3.5M 0.0 12:37:43
14.2 1.2M 173.0 870.4K 0.0 12:37:47