How Intel/AMD (inadvertently) fixed GNU Hurd

Last Friday, on Hurd’s IRC channel at freenode, we’ve accidentally noticed some machines were able to run certain operations on Hurd as KVM guest up to 10x faster than others. As antrik correctly guessed, this is the effect of Intel’s Extended Page Tables, which allow the guest operating system to deal with it’s own page faults. I suppose AMD’s Rapid Virtualization Indexing could have a similar effect, but I don’t have the hardware to be able to test it (please write to the mailing lists if you’ve been able to check it).

Since most people (including myself) are running Hurd in a virtualized environment, having the ability of taking advantage of this circumstance by moving to hardware with this technology supposes a great improvement, heavily reducing compilation times and increasing the interactivity of the entire system.

Let’s see an small example of the difference between running with and without EPT.

Running without EPT (modprove kvm-intel ept=0):
root@debian:~# dd if=/dev/zero of=/dev/null bs=256k count=1000
1000+0 records in
1000+0 records out
262144000 bytes (262 MB) copied, 2.08 s, 126 MB/s

And with EPT:
root@debian:~# dd if=/dev/zero of=/dev/null bs=256k count=1000
1000+0 records in
1000+0 records out
262144000 bytes (262 MB) copied, 0.23 s, 1.1 GB/s

I think there will be interesting times for GNU Hurd.