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.
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:I hope this helps you; you didn't tell us anything detailed.
I had the same monitoring desire - it occurs to me
/dev/shm
could be mounted to a loop device (ie./dev/loop0
) and that loop device can be monitored [1]. The problem is a loop device would need a static file that is formatted with it's own filesystem and that defeats the point of the speed with tmpfs.But note while tmpfs cannot be easily monitored,
/dev/ram0
etc. can be by default.Perhaps a linux expert can comment if tmpfs can be mounted to a loop device directly, I am uncertain.
[1] iostat does not seem to report statistics on loop devices (tested on linux 3.14.27/fedora 19).