I’m working on moving to a newer version of ADCD, but I do not have enough space for all of the ADCD disks, on my SSD drive, so I am using an external USB device. Which of my new files should I move off the USB drive onto my SSD device for best performance?
Background
How much free space do I have on my disk?
The command
df -P /home/zPDT
gave
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/nvme0n1p5 382985776 339351984 24105908 94% /home/zPDT
This shows there is not much free space. What is using all of the space?
ls -lSr
the -S is sort by size largest first, the -r is reverse sort, so the largest comes last.
This showed me lots of old ADCD files which I could delete. After I deleted them, df -P showed the disk was only 69% full.
zPDT “disks”
Each device as seen by zPDT is a process. For example
$ps -ef |grep 5079
colin 5079 4792 0 10:21 ? 00:00:00 awsckd --dev=0A94 --cunbr=0001
So process with pid 5079 is running a program awsckd passing in the device number 0A94
Linux statistics
You can access Linux statistics under the /proc tree.
less /proc/5079/io
gave
rchar: 251198496
wchar: 79167416
syscr: 4525
syscw: 1403
read_bytes: 78671872
write_bytes: 78655488
cancelled_write_bytes: 0
rchar: characters read
The number of bytes which this task has caused to be read from storage. This is simply the sum of bytes which this process passed to read(2) and similar system calls. It includes things such as terminal I/O and is unaffected by whether or not actual physical disk I/O was required (the read might have been satisfied from pagecache).
wchar: characters written
The number of bytes which this task has caused, or shall cause to be written to disk. Similar caveats apply here as with rchar.
read_bytes: bytes read
Attempt to count the number of bytes which this process really did cause to be fetched from the
storage layer. This is accurate for block-backed filesystems.
write_bytes: bytes written
Attempt to count the number of bytes which this process caused to be sent to the storage layer.
How to find the hot files
Use the Linux command
grep read_bytes -r /proc/*/io |sort -k2,2 -g
This finds the read_bytes for each process. It then sorts numerically (-g) and displays the output. For example
/proc/5088/io:read_bytes: 55910400
/proc/5078/io:read_bytes: 61440000
/proc/5091/io:read_bytes: 72916992
/proc/5079/io:read_bytes: 78671872
/proc/5076/io:read_bytes: 138698752
/proc/5074/io:read_bytes: 321728512
You can then display the process information
ps -ef |grep 5074
Which gave
… awsckd –dev=0A80 –cunbr=0001
From the devmap ( or z/OS) device 0A80 is C4RES1.
The disks with the most read activity were (in decreasing order) C4RES1, C4SYS1, C4PAGA, USER02, C4CFG1, C4USS1