I/O Under Linux

I really didn’t intend to do a post focusing on I/O, an absurdly boring topic to most people, but I’ve recently stumbled across a few related tools that Linux users might find interesting.

  • ionice is standard on newish CentOS, at least. I ran into a situation where I have to back up an active NFS server. This sounds like it could spell disaster, with nfsd needing fast access and rsync wanting to touch hundreds of gigs of data as fast as it can. The nice command is meant to limit number-crunching, not disk-spinning. But never fear: ionice is here! Slapping ionice -c2 -n7 in front of my mammoth rsync seems to have done the trick: NFS stayed peppy for the duration of the transfer.
  • Something that I forget often: if you’re copying files around for the first time, or it’s been so long that the files are wholly different, use straight scp or something similar, not rsync. I don’t have the numbers to back it up, but rsync is good at copying over only what’s changed, but it’s a waste of time if the source and destination files are completely different.
  • dstat is a colorful replacement* for iostat. (* because it’s not necessarily a replacement, so much as a tool folding iostat, vmstat, and some others into one.) You can read the man page for dstat to find out plenty, but just typing dstat and letting it run is a good enough starting point. Network and interrupt stats, too!
  • Some of this interest comes from perusing the slideshows on the Percona Conference site. Also worth checking out are their presentation slides in general.

Leave a Reply

Your email address will not be published. Required fields are marked *