Monitor IO to tmpfs partition

iotmpfs

How can I monitor the write speed to a tmpfs partition. It does not appear in the output of vmstat or iostat.

I am running several python processes that are writing heavily to tmpfs and contributing to load. The load is high but the CPU, memory, disk IO, etc is all nominal. The load seems to be taking this heavy tmpfs IO into account indirectly somehow. I'd love to know the write speed to have an idea of upper limits per host. I'm running blind any help would be appreciated.

Best Answer

tmpfs is not a block device, so ordinary I/O monitoring tools are no good for you.

One way to monitor write speed would be to use pv command. pv, Pipe Viewer allows you to see statistics about current process in situations you normally would be blackboxed, such as during compressing a huge log file or creating a tar ball.

Typical use cases of pv include stuff like this:

pv /path/to/your/log | gzip >/logarchivedir/log.gz
tar cvfz - /your/directory | pv >/outputdir/yourdir.tar.gz

I hope this helps you; you didn't tell us anything detailed.