Herman Bos open source guerilla

18Feb/080

Commodity hardware++: Storage server

Great what you can do with commodity hardware these days:

storage-mc:/data# dd if=/dev/zero of=test.img bs=1M count=102400
102400+0 records in
102400+0 records out
107374182400 bytes (107 GB) copied, 698.145 seconds, 154 MB/s

4 x WD 500GB RE2 disks in RAID1+0. With a 4-port Areca 1210 hardware raid card. Sure beats Linux software RAID1 with performance.

Nothing bad about Linux software RAID1, we use it in many places. Just when you need that bit more I/O and SAS/SCSI is not really justified hardware SATA RAID can really make the difference. The Western Digital RE2 (Raid Edition 2) disks are also pretty good. These disks have 92MB/s buffer to disk and NCQ (Native Commandline Queuing). No complains so far!

14May/0739

Ubuntu software raid performance problems

We recently experienced some performance problems with an Ubuntu machine with software raid1. To localize it a bit further I ran some tests on different setups. For comparison I also included a setup with hardware raid and a setup with software raid on CentOS, I will also post the specs of the machines in question but I don't believe the specs have a noteable influence.

I tested with the transfer speeds with the following commands:
Write: dd if=/dev/zero of=test.img count=300 bs=10M
Read: dd if=test.img of=/dev/null bs=10M

Setup 1:
HP DL145 (Dual-Core AMD Opteron(tm) Processor 2210 HE, 1GB ECC reg)
RAID: 3ware Escalade 8006-2LP, PCI-X in RAID1
Disks: 2x Western Digital 80GB, 7200rpm, SATAII, 8MB cache
Distribution: Ubuntu 6.06 LTS, kernel 2.6.15-28-amd64-server
Write Results: 3145728000 bytes (3.1 GB) copied, 113.433 seconds, 27.7 MB/s
Read Results: 3145728000 bytes (3.1 GB) copied, 63.1678 seconds, 49.8 MB/s

Setup 2:
HP DL145 (Dual-Core AMD Opteron(tm) Processor 2210 HE, 1GB ECC reg)
RAID: md software raid1
Disks: 2x HP certified 80GB Seagate disks, 7200rpm, SATAII, 8MB cache
Distribution: Ubuntu 6.06 LTS, kernel 2.6.15-28-amd64-server
Write results: 3145728000 bytes (3.1 GB) copied, 753.233 seconds, 4.2 MB/s
Read results:
3145728000 bytes (3.1 GB) copied, 85.2566 seconds, 36.9 MB/s

Setup 3:
HP DL145 (Dual-Core AMD Opteron(tm) Processor 2210 HE, 1GB ECC reg)
RAID: md software raid1
Disks: 2x HP certified 80GB Seagate disks, 7200rpm, SATAII, 8MB cache
Distribution: Ubuntu 6.10, kernel 2.6.17-11-server (x86_64)
Write results: 3145728000 bytes (3.1 GB) copied, 729.397 seconds, 4.3 MB/s
Read results: 3145728000 bytes (3.1 GB) copied, 49.0884 seconds, 64.1 MB/s

Setup 4:
HP DL145 (Dual-Core AMD Opteron(tm) Processor 2210 HE, 1GB ECC reg)
RAID: md software raid1
Disks: 2x HP certified 80GB Seagate disks, 7200rpm, SATAII, 8MB cache
Distribution: Ubuntu 7.04, kernel 2.6.20-15-server (x86_64)
Write results: 3145728000 bytes (3.1 GB) copied, 528.52 seconds, 6.0 MB/s
Read results:
3145728000 bytes (3.1 GB) copied, 58.7009 seconds, 53.6 MB/s

Setup 5:
Intel(R) Celeron(R) CPU 2.66GHz, Intel 3000 serverboard, 1GB DDR2 RAM
RAID:
md software raid1
Disks: 2x Westerm Digital 500GB disks, 7200rpm, SATAII, 16MB cache
Distribution: CentOS 4, kernel 2.6.9-42.0.10.EL (x86_64)
Write results: 71 seconds should be ~44MB/s
Read results:
47 seconds should be ~67MB/s

Notes: The CentOS4 time is measured with `time` since dd version in CentOS doesn't give stats itself. It might differ from the way dd measures the time. The hardware raid setup has western digital disks vs. seagate disks in the Ubuntu software raid setups. Personally we have the feeling the 80GB seagate disks are a bit faster then then 80GB WD disks but that might be an illusion. The Ubuntu setups all use JFS as filesystem and the CentOS ext3.

Conclusion: We can see that the Ubuntu software raid at least has a write performance issue. The software raid performance in CentOS seems to be much more decent. We would conclude that its something in the Ubuntu kernel area which makes the software raid suck balls and not software raid perse. The only other factor which might make a difference is the filesystem, however we never had JFS performance problems and filesystems are a different layer in the kernel AFAIK.

Suspicions: We have the feeling that if you have concurrent write actions, the performance will go down much more then the crappy 4-6MB/s. We also noticed that the load goes skyhigh if you do disk stuff with software raid on Ubuntu (breaks 15.00 easily with a 3GB mysql import with binlog on, leaving most things unresponsive). The load on CentOS doesn't seem to go up too much. IIRC we got the same crap performance in Debian which we gave a quick test (etch).

27Jan/075

Playing around with Xen Express

Since the Xen PV drivers for Windows only work on the commercial/closed source Xen versions I ended up doing a test run of Xen Express. Its a bit nasty as you can expect but its much better then I expected.

The installation

You boot up the Xen Express install disk, pass a simplified text based installer (redhat style) and reboot. After this you can run the Windows or Linux client to connect to your fresh Xen express server and get to work.

The shipped GUI for Linux works fine (not bad for java). If you use Ubuntu you can easily use `alien` to turn the rpms in debs. If you install the packages everything ends up in /opt.

Looking at Xen Express without a GUI

Fortunately its still possible to login on the system on the console or through ssh. A customized redhat system will present itself to you. There is a small root partition and the rest of the data is in LVM. For every disk there will be an LVM block device (which will presented as disks to the started xen domains). If you login you can also place installation iso's on the filesystem, which would make you able to select the iso's in the GUI as cdrom volume and use them as installation source (else you have to insert a cd in the server).

The crap part, which was to be expected: Your limited if you want to work from a shell. The logical volumes in LVM are named with a long UUIDs. I can imagine why thats likeable the way they build it, but it makes a quick snap shot of a volume difficult (especially when you have a lot of volumes). Together with DomU config files that are screwed up (every thing on one line and UUID filenames) this kills off the fun stuff. The one thing that still works is the "xm" tool, didn't test it extensive but at least `xm list` still works. So you can probably still do the basic operations (start, restart, shutdown, destroy, etc.).

Xen Express GUI, Windows PV drivers that work and the rest of it

When I started this post I was still mildly positive, but unfortunately it has been in my drafts for a week now. Now finishing it up a week later.

The windows PV drivers basicly give you native performance. Thats great. The GUI is not _that_ bad either. Annoying at some points but you can live with it. A few screenshots: (uh, got 'm at the office, wait a day).
Now that rest of it: Things that suck:

  • Dom0 kernel is mutilated
    Many many drivers are missing. It doesn't even have the iptables physdev module to filter on a bridge. On the support pages I also found a lot of complaints about missing RAID drivers, etc.
  • Software RAID big PITA
    The installer doesn't support making any software raid devices. Its not impossible to do so afterward (except for the root filesystem I guess) but its certainly a PITA. I tried to move the LVM partition to an md device, succeeded but when I removed the non raid LVM pv I got errors after reboot. Too bad. However I'm sure its possible. Another way I didn't try since I didn't want to waste more time is to make a new "SR" or something like that. Its to be able to swap disks to one machine to another. Quite sure you could fix up a raid volume and make it used by Xen. This way you would be able to have software raid for your VM's at least.
  • Only HVM for Windows. Linux is still para-virtualized
    Maybe nice for performance but I want the real virtualization so I can do anything I want in the guest domain. You can get it to install but its more like tricking the GUI. Which also means you can forget about paravirtualized drivers (crap performance).
  • Can't define vif-interface names
    Every DomU gets a virtual network interface (vif), unfortunately in Xen express you can't define it. So you can never make any firewall rules (if the DomU gets restarted the vifname changes accordingly with the dom-id. Please fix that you can set dom-id or vifname.
  • The OS templates are really messed up
    If you install debian you'll be surprised its so quick to install. Nice? No. The installation is so screwed over, it sucks balls. Besides that you get gdm and vnc for free. I didn't login with VNC it might hold more surprises. The crap thing of these templates is that the ones shipped are useless. In unofficial docs you can find how to make these templates but I didn't bother since we already found the whole Xen Express system too limited for our situation.
  • Firewalling your VM's is a PITA
    Mostly because of the implications mentioned above its a pain to firewall your Windows machine in Linux. From Dom0 it would be impossible, so we got this fix: Create a second bridge. Create a VM from the debian template system with two nics. Put the first interface in a bridge with the peth0, put the second one in a bridge with your Windows VM. Do the filtering in the debian instance. Most transparant way is to create a bridge device (put eth0 and eth1 in it) and filter the traffic with the physdev iptables module. If you want to reach this machine from the outside you can give an IP to the bridge device. I hope it helps.

I recommend to try Xen Express out if you like a lot of pain and like to see if it really stinks for yourself or if your a sore Windows user which doesn't realise the limitations and is surprisingly happy when buttons do work.

If you were doing advanced stuff with the open source Xen version and like your tools and freedom, stay away from this. If you have Linux experience and want to run Linux VM's: use the open source version. IMO the only reason you can consider using Xen Express is that the Windows PV drivers work. Even with Windows for real production work, dunno, you should weigh the options vs. a dedicated server.

Tagged as: , 5 Comments
28Dec/061

A definite don’t buy if you like hardware support

We had a night of computer terror:

Sometimes I hate computers so much. :)

Tagged as: , , 1 Comment