Posts

Showing posts with the label strace

Using strace to determine the I/O block size

I'm a big fan of IOMeter, but what if we didn't write the software that we want to test, and don't know the IO sizes it chooses? If it's a VMware VM, we can probably leverage vscsistats, but, I want to make this hypervisor agnostic, and so I turn to strace. In my baseline observations, I observed that 16KB reads and writes were the best for my storage, the question then became, what size IO is my application using? To answer this question, we need to leverage strace, and we care about reads and writes. We will assume that we want to look at a simple cat command on a large (2GB) file. Command: # strace -e read,write cat iobw.tst -o /var/log/strace.log This will read the file iobw.tst, and redirect the filtered strace output to /var/log/strace.log . When we open strace.log we see the following: write(1, "))))))))))))))))))))))))))))) )))"..., 65536) = 65536 read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ 0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ 0\...