Select Page

XEN, Bridging and Hetzner

I’ve a machine at Hetzner DE and have been pretty happy with it and their service in general. I used to run VMWare Server on it for virtualisation but have become a bit annoyed at the totally unfixable clock problems that seems to be the norm with VMWare guests.
First the good news. I decided to give XEN a try on it, same setup same spec virtual machine on the host doing the same workload as before, below a CPU usage graph before and after, enough said.


I know it’s not the same technology etc, but XEN VMs will do what I need now so it seems a good option for me.
Now for the bad, I had a few problems:
  • Hetzner uses a DHCP/TFTP rescue system that is very useful, if I make a mistake in a network config for example I can sort it out via this. XEN by default works in a bridged mode that will change the MAC address for your eth0 to FE:FF:FF:FF:FF:FF. The problem is that Hetzner uses Realtek NICs which as most people know are uber crap. When the machine gets a normal alt-ctrl-del or other reboot other than a power cycle the NIC does not reset to the original MAC. So if I get a crash I wont ever get to the rescue system. This cost me 119 Euro this weekend in support fees.
  • In the past I had a few crashes on this machine, adding acpi=force irqpoll noapic to the kernel command line solved it, however the XEN kernel won’t poll my drives properly without removing the noapic bit, so I hope my machine doesn’t become unstable all of a sudden.

I am using CentOS 5.0 on this machine that came with XEN out of the box so installation was dead easy, creating new VM’s are easy etc and very importantly I can manage the VM’s all through text consoles which was a pain for me under VMWare as I don’t use Windows or Linux, getting console access was tough.
So about the MAC address, this turned out incredibly easy to fix by turning the machine into a routed network setup instead of a bridge, so previously the network was bridging eth0 with the vif’s from the virtual machines onto the wire, this required the MAC address of eth0 to change. Moving to a routed setup required the following changes:
/etc/sysctl.conf:

net.ipv4.ip_forward = 1
net.ipv4.conf.all.proxy_arp = 1

This basically enables routing and sets up proxy arp across all interfaces, this is to work with Hetzner’s routing where they don’t actually add a route to my subnet over my eth0 but over to the switch is connected too. Proxy ARP sorts this out.
/etc/xen/xend-config.sxp:

#(network-script network-bridge)
#(vif-script vif-bridge)
(vif-script vif-route)
(network-script network-route)

This points XEN to its provided route scripts rather than the bridge ones.
Reboot virtual machines and thats that. Machine is perfectly happy, routing traffic and MAC address is correct.
Bonus is now all traffic gets routed through my Dom0 and I can now do all the firewalling there outside of my DomU’s which enhances security as it is essentially a border firewall.

MySQL European Customer Conferences 2007

Today I attended the MySQL European Customer Conference in London. I was quite excited about it hoping for some good tech sessions and such, especially after seeing the lineup:

  • MySQL roadmap
  • MySQL performance tuning including real world examples
  • MySQL for online applications
  • MySQL for data warehousing and bi
  • Presentation by the Swedish Police
  • Presentation by Net-A-Porter DBA
  • High Availability Strategies for MySQL
  • Multiplay Telecom Service Architectures with MySQL Cluster Carrier Grade
  • Defining an Effective Storage Engine Strategy

Thats a pretty decent line-up, seemed like a lot of solid tech info in there. I chose to attend the MySQL Roadmap, MySQL for online applications, Net-A-Porter, Multiplay Telecom Service Architectures with MySQL Cluster Carrier Grade and Defining an Effective Storage Engine Strategy
The sessions by MySQL employees were good, obviously done by senior sales type guys but all knowledgeable. The sessions were though aimed at tech management types rather than pure tech people, they contained a lot of what can only really be described as sales talk. This held true for the Datawarehousing, Storage Engine and obviously the roadmap talks.
The session on MySQL for online applications could have just been left out really, nothing was really said of any substance, the basic building blocks of a web architecture was mentioned but just not in any sufficient detail.
I found the data warehousing session good as I am currently running into some needs for this kind of application, the roadmap was very helpful if only to show me that some of the much needed improvements is way down the line ๐Ÿ™
I attended the Pret-A-Porter talk as I was hoping to get some insight into the workings of a big MySQL shop. Turns out the DBA who was running the chat was new in the job and can’t really comment on any of the decisions that got them where they are today. He came up with such gems as ‘to me Hibernate is just this horrible little thing the developers use’ and couldn’t really describe why he made some choices like use InnoDB for everything. When asked how he optimised the database he just said he followed the basic recommendation the MySQL Enterprise Monitor suggested, couldn’t really go into any details. In fact he didn’t even know what hardware they run on.
Further I question the choice of partner for this specific presentation, these guys have about 2GB of data and it all fits into the query caches, they have one database server and is considering moving to a DRDB HA cluster, again he can’t really say why thats just what he was told to do. Frankly, running a MySQL server with 2GB data that performs well is no challenge and few people in the industry that actually use MySQL can learn from this presentation.
I chose the Telecoms Strategies talk as it was touching on MySQL Cluster which is something I have read about but never had opportunity to use. The presentation was well rounded, delivered professionally and gave me a lot of insight in the underlying NDB storage engine that enabled MySQL Cluster. The guys focus on talking direct to the NDB using the API rather than SQL so not quite typical but it was really interesting to get a view on the structure of the engine and how it sticks together. It made it crystal clear to me that Cluster would be a engine you would only use in very specific work loads. This was confirmed later on in the conf.
Overall, I feel I didn’t get value for my buck from the conference. Very little that was said had any bearing on my database that is approaching 100GB with 5000 queries per second.
A co-worker attended the performance sessions, he left equally unimpressed. The guys from MySQL Performancing Blog were constantly having to correct the speaker on his points.
So, again, pretty unimpressed. I think I’d need to attend one of the User Conferences which should have a more tech focus at least in parts ๐Ÿ™

iPod Touch

I previously mentioned how I am not a fan of the new iPods, I did not get a chance to see the touch then yet.
Now I have and I am sold, they are expensive but I think ultimately even without being able to get one in from a cheaper country I’ll end up getting one.
It’s really nice and fun to use, performs and responds quickly to your commands, even coverflow is usable which is what I really want from this device at the moment, a great ipod.
Obviously I would have liked it to be an open platform where I can run 3rd party applications, that would be fantastic. It is not however what I am looking for in an iPod so I am pretty happy to get my hands on one, might do so ‘morrow when I am in the city if they have stock.
The only 2 major missing features in my mind would be more storage and bluetooth, other than that I think it’s the one to have.

The State of The iPod

Firstly, I am sorry I have not been posting here often, work has become incredibly busy as I recently started a big push in getting my own business off the ground which as anyone know is very time consuming.
Now about the iPods, Apple recently released all new iPods through the whole range and of course the new iPod Touch. I went to the shop to take a look at the iPods (not the touch yet) and have to say I am incredibly disappointed.
Each iPod that has a display now does video, cover flow, animations and a revamped interface, all of this comes at a cost of processing power. Unfortunately it seems the CPUs are not up to it. Consistently throughout the range the interface is sluggish and you end up waiting around for things to happen quite a bit.
The wheel on the classic is also not as precise as you’d want it. I have a old (now dead) iPod and I found it much easier on it to go direct to the song/album I wanted because the wheel was much more accurate.
There are work arounds for the sluggishness – turn off album art – but that distracts from the niceness of the whole thing.
So now I am holding out hopes for the Touch, even though it is too small to hold my music it might be the solution. Reports indicate that the screen is bad compared to the iPhone and so might not be that great.
So have we reached the point where there is no iPod worth buying? I am starting to think so ๐Ÿ™

Exim on CentOS 4

I recently bought a new machine from Layeredtech for my commercial mail anti spam system and am having endless troubles with it. I have a similar machine at Hetzner also running CentOS 5 and it too is having problems, though less frequently.

The short of it is that the drives disconnect, file systems go read only and the box needs a reboot:

ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen
ata1.00: (BMDMA stat 0x4)
ata1.00: tag 0 cmd 0xca Emask 0x4 stat 0x40 err 0x0 (timeout)
ata1: soft resetting port
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
ata1.00: qc timeout (cmd 0xec)
ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)
ata1.00: revalidation failed (errno=-5)
sd 0:0:0:0: SCSI error: return code = 0x00040000
end_request: I/O error, dev sda, sector 226813249
Buffer I/O error on device sda3, logical block 27835568
lost page write due to I/O error on sda3
sd 0:0:0:0: SCSI error: return code = 0x00040000
end_request: I/O error, dev sda, sector 227360961
Buffer I/O error on device sda3, logical block 27904032
lost page write due to I/O error on sda3

So in an effort to figure out if this is a CentOS 5 problem – both ISPs certify CentOS 4 on their hardware – I needed to get my application going on CentOS 4. This turned out to be quite a mission involving getting Exim with MySQL and the recently integrate exiscan rather than the patched version.

I looked at the various options and decided to just backport CentOS 5’s Exim package to CentOS 4.

As it turns out I haven’t yet had a machine re-installed with CentOS 4 as I found some posts suggesting some kernel parameters that might fix things, I’ve applied these now to the machines and wait.

My Exim RPMs can be found below:

exim-4.63-3.src.rpm
exim-4.63-3.i386.rpm
exim-mon-4.63-3.i386.rpm
exim-sa-4.63-3.i386.rpm

As with the CentOS 5 ones you’ll need various DB client libraries installed as this supports speaking to Postgres, MySQL, SQLite etc.

This should be useful to anyone who just wants a more recent version of Exim on their CentOS/RedHat 4 machines.