Xenを超高速化する魔法

echo "hwcap 0 nosegneg" > /etc/ld.so.conf.d/nosegneg.conf
ldconfig

とするだけ。


なんで速くなるかというと

mv /lib/tls /lib/tls.disabled

というのだけだど実はTLSが無効*1になっていなくて、上のようにするとちゃんと無効になるからなのです。


体感でもかなり速くなった気がします。
こんなに違うのかー。



***************************************************************
***************************************************************
** WARNING: Currently emulating unsupported memory accesses **
** in /lib/tls glibc libraries. The emulation is **
** slow. To ensure full performance you should **
** install a 'xen-friendly' (nosegneg) version of **
** the library, or disable tls support by executing **
** the following as root: **
** mv /lib/tls /lib/tls.disabled **
** Offending process: modprobe (pid=813) **
***************************************************************
***************************************************************
ブート時にこんな感じのメッセージが出ている人は試してみましょう。

*1:XenTLSに対応していないので、それが有効になっていると極端にパフォーマンスが落ちる