Shortening disk benchmark time
When benchmarking storage configurations, it’s important that your benchmark’s set of test data be larger than the amount of memory in the computer where the benchmark is running. Otherwise, the results will be more reflective of your operating system’s caching behaviour than your storage system. For example, on a server with 8GB of RAM I would set iozone’s -g argument to 16GB. Of course, tests that write this much data can take a long time. This can be a problem when you’re trying to test many small tweaks to your storage. A way to speed this up is to use the linux kernel’s mem parameter. For example, in my GRUB configuration I could set kernel /vmlinuz ro root=/dev/example/root mem=1G. When I boot with this parameter set the system will only have 1GB of memory available, so I can reduce my test data to 2GB. This makes iterating through many storage configurations much quicker.
Online resizing with multipath and lvm
Here is a walkthrough on how to add more disk space to a system using multipathing and LVM without needing any downtime. In addition to showing the commands necessary to perfom the capacity expansion it is intended to show how, even if you didn’t know how the storage on a server was set up, you could figure it out. It assumes you’re using RHEL5 and a filesystem mounted on a device from a SAN that has more space available. In this example, I want to resize /u02 on a system named eserver.
Why powertop is awesome
I recently got a new, off-brand replacement battery for my Inspiron 1420 laptop. I used it for the first time today and was shocked to see the charge go from 100% to 10% in about 50 minutes while I was writing some emails. No noteworthy processor or disk activity was evident in my system monitor applet. Just as I was about to write a negative review on Amazon, it crossed my mind to check PowerTOP. PowerTOP is a utility for viewing how much time an Intel processor is spending in various power-saving states and what processes are waking it up from idle. I discovered I had left a virtual machine running. It was stuck trying to PXE boot; while its actual use of processor time was minimal, it was causing around 3000 wakeups a second! Shutting this virtual machine down brought wakeups down to a more reasonable 250 per second. This highlights how important the power savings from idling are on a modern processor and how powertop can help diagnose problems that would be difficult to tackle with other tools.