Xen problems and the xen_emul_unplug argument

No Comments

Having spent a good amount of time working with the Xen platform, I’ve come across numerous occasions where the guest operating system would sometimes not detect disks and/or networking would not function. If you are having problems with a Linux based Xen guest, try this as a kernel argument at boot time:

xen_emul_unplug=never

I’ve used it with success on Fedora, Ubuntu, and Debian personally.

Quickly delete all e-mails in Exim queue

No Comments

If for some reason or another you end up with a ton of e-mails in the queue and need them gone quickly, the command below will do the trick:

find /var/spool/exim/input -name '*.*' -exec rm {} \;

Speed up disk I/O with relatime option

No Comments

Most distros are now using ext4, which is great. We know that ext4 performs better than ext3. Did you know that you can make your system perform even better with a thirty second file modification?

The “relatime” option controls how ext4 records last access time information for files. By default, ext4 will modify a timestamp on a file everytime it is accessed. This may not seem like a significant performance killer, but trust me, it is. Adding relatime stops this from occurring, boosting your performance.

Your /etc/fstab file will looking something like this:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
proc /proc proc nodev,noexec,nosuid 0 0
/dev/sda3 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /boot ext3 defaults 0 2
# /home was on /dev/sda4 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home ext4 defaults 0 2
# swap was on /dev/sda2 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap sw 0 0
# ramdisk
tmpfs /tmp/ramdisk tmpfs rw,size=2G 0 0

We want to add the “relatime” option to your “/” partition. Also, your “/home” partition, if you have a separate “/home”. When done, your /etc/fstab will look more like this:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
proc /proc proc nodev,noexec,nosuid 0 0
/dev/sda3 / ext4 relatime,errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /boot ext3 defaults 0 2
# /home was on /dev/sda4 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home ext4 relatime,defaults 0 2
# swap was on /dev/sda2 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap sw 0 0
# ramdisk
tmpfs /tmp/ramdisk tmpfs rw,size=2G 0 0

Now, most would say to reboot your computer to have the change take effect. Not necessary. Simply run:

sudo mount -o remount /
sudo mount -o remount /home (if you have a separate /home)

Enjoy your speedier installation.

Exim DB Problem

No Comments

If you find that incoming mail is rejected by Exim, and you see the following in your logfile, move /var/spool/exim/db/ratelimit out of the way, and then restart Exim. Problem solved.

failed to open DB file /var/spool/exim/db/ratelimit: Bad file descriptor
Berkeley DB error: memp_fopen: page sizes must be a power-of-2