What is ’steal time’ in my sysstat output?

After running sar on my new slice from SliceHost*, I noticed a new column called steal. It’s generally very low on my virtual machine, and I’ve never seen it creep over 1-2%.

IBM’s definition of steal time is actually pretty good:

Steal time is the percentage of time a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor.

So, relatively speaking, what does this mean?

A high steal percentage may mean that you may be outgrowing your virtual machine with your hosting company. Other virtual machines may have a larger slice of the CPU’s time and you may need to ask for an upgrade in order to compete. Also, a high steal percentage may mean that your hosting company is overselling virtual machines on your particular server. If you upgrade your virtual machine and your steal percentage doesn’t drop, you may want to seek another provider.

A low steal percentage can mean that your applications are working well with your current virtual machine. Since your VM is not wrestling with other VM’s constantly for CPU time, your VM will be more responsive. This may also suggest that your hosting provider is underselling their servers, which is definitely a good thing.

* I’ve been a customer of SliceHost for a while (prior to Rackspace’s acquisition), and I recommend them to anyone who needs a solid VM solution. If you want to help out with my hosting costs, you’re welcome to use my SliceHost referral link.

Syncing an iPhone with a new Mac without hassles

I know I usually talk about Linux server related topics on this blog, but I’m pretty proud of what I’ve figured out this morning on my Mac. As you know, the iPhone can really only fully sync with one machine, and if you want to connect it to a new Mac that you’ve purchased, you have to fully erase the iPhone and start over. (Of course, if you used the Migration Assistant to set up your new Mac, this won’t be necessary.)

Here are the steps to migrate your iTunes data from one Mac to another without having to erase and re-sync your iPhone:

  • Make sure that iTunes is not running on both Macs.
  • Disconnect your iPhone/iPod from both Macs.
  • Copy your iTunes folder.
    /Users/username/Music/iTunes
  • Copy your iPhone/iPod backups.
    /Users/username/Library/Application Support/MobileSync
  • Copy your iTunes configuration files.
    /Users/username/Library/Preferences/com.apple.iTunes*
  • Open iTunes on your new Mac and verify that Applications and Ringtones appear.
  • Connect your iPhone/iPod to the new Mac and accept any new authorizations.
  • Use iTunes on your old Mac to de-authorize the computer.

If you choose to keep your MP3’s separate from iTunes (and not in the library), this will only copy over the references to the MP3 files themselves.

Installing Microsoft’s TrueType fonts on Linux servers

Although the idea of putting something from Microsoft on a Linux box might sound awful at first, you may find a reason to use Microsoft TrueType fonts on a Linux server. If you’re using GD to render an image, these fonts may come in handy.

If you have an RPM-based linux distribution, you can use a spec file that is available on SourceForge. You can follow the instructions on the project’s page, or you can follow these abbreviated instructions here:

Install some prerequisites:

// RHEL 4
up2date -i rpm-build wget ttmkfdir
// RHEL 5
yum install rpm-build wget ttmkfdir

Install cabextract.

Build the RPM:

wget -O /usr/src/redhat/SPECS/msttcorefonts-2.0-1.spec http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec
rpmbuild -bb msttcorefonts-2.0-1.spec
rpm -Uvh /usr/src/redhat/SPECS/msttcorefonts-2.0-1.spec

Test it to be sure that they’re installed:

xlsfonts | grep ^-microsoft
rpm -ql msttcorefonts

ext3_dx_add_entry: Directory index full!

I found a server last week that was having severe issues with disk I/O to the point where most operations were taking many minutes to complete. The server wasn’t under much load, but a quick run of dmesg threw quite a bit of these lines out onto the screen:

EXT3-fs warning (device sda5): ext3_dx_add_entry: Directory index full!

After a thorough amount of searching, I couldn’t find out what the error actually meant. As with most errors starting with EXT3-fs warning, I figured that a fsck might be the best option.

During the fsck, several inodes were repaired and the check completed after 10-15 minutes. I jotted down some notes about the directories that popped up on the screen during the fsck. The server rebooted it came up without any problems.

I reviewed the directories that appeared during the fsck and they were full of files. Some of the directories contained upwards of 200,000 files. Many of the files were moved into lost+found after the fsck, so they had to be restored from their backups. I still don’t know what caused the original issue as the hardware checked out fine. If you run into this error, a fsck should help, but make sure that you have backups handy.

Working hard on PleskHacker

Some of you may have already noticed from my Twitter feed, but I’ve started a complete re-write of pleskhacker.com in an easier-to-use format. The old site was done in Dokuwiki, and I found that it didn’t scale too well. The new site uses Wordpress, and the performance is already improving.

Another improvement to the site is that it is now hosted on Mosso. This should allow the site to handle a lot more traffic and be more redundant than the original configuration. Eventually, I’ll move this blog to Mosso® as well.

What is PleskHacker? It’s part of an effort to provide more detailed documentation of Plesk for system administrators. PleskHacker has documentation covering one third of the Plesk database so far. It includes definitions for each column and table, but it also shows relationships between tables so you can create your own JOIN queries with ease.