Information Technology Grimoire

Version .0.0.1

IT Notes from various projects because I forget, and hopefully they help you too.

Disk I/O

Disk I/O (top wait states)

High Disk I/O will also cause high CPU because the interrupts during write/read slow down the CPU.

Disk I/O (iostat)

tools like iostat are useful, but are not installed by default. Look for anything at or near 100%, the higher it is the more the disk activity is.

Disk I/O (vmstat

Other tools like vmstat might be useful simply because they are always present. The si and so are the main things I look at, but there is plenty of other info here too. swap in and swap out tells me if the swap file is being used, and if it is I know I have memory bottlenecks that are slowing down my system as it tries to emulate RAM on swap. In this case I should identify what is causing the memory consumption and decide if I need more memory if I need to optimize my application to not use so much memory. For example, MySQL uses several hundred MB, but MariaDB uses 20-30MB when I use them for wordpress. Both do the same thing, so why use MySQL at all?

what drives partitions and sizes?

lsblk

Drive Info

sudo hdparm -I /dev/sdX

Drive Write Speeds

└─$ dd if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 0.910447 s, 1.2 GB/s

Drive Read Speeds

└─$ sudo hdparm -tT /dev/sda
/dev/sda:
 Timing cached reads:   28410 MB in  2.00 seconds = 14226.54 MB/sec
 Timing buffered disk reads: 114 MB in  3.03 seconds =  37.60 MB/sec
└─$ sudo hdparm -tT /dev/nvme0n1
/dev/nvme0n1:
 Timing cached reads:   29440 MB in  2.00 seconds = 14742.56 MB/sec
 Timing buffered disk reads: 3432 MB in  3.00 seconds = 1143.61 MB/sec