Ruby在Ubuntu 10.10上安装在一台机器上很慢,但不是其他的

我有几个月前提供的机器。 RVM被用来安装ruby1.9.3-p125以及1.9.3-p125-perf。 当我将原始ruby的性能与另一台相同的机器进行比较时,旧的机器吸入了它们。

例如:

================================================================================ With in-block needle calculation ================================================================================ Rehearsal ---------------------------------------------- detect 3.790000 0.000000 3.790000 ( 3.800895) each 2.410000 0.000000 2.410000 ( 2.420860) any 3.960000 0.000000 3.960000 ( 3.972099) include 1.440000 0.000000 1.440000 ( 1.442862) ------------------------------------ total: 11.600000sec 

VS

 ================================================================================ With in-block needle calculation ================================================================================ Rehearsal ---------------------------------------------- detect 10.740000 0.000000 10.740000 ( 10.769366) each 6.080000 0.010000 6.090000 ( 6.106323) any 10.600000 0.000000 10.600000 ( 10.641606) include 4.160000 0.000000 4.160000 ( 4.171530) ------------------------------------ total: 31.590000sec 

我试图用rvm在快速机器上重新安装1.9.3-p125,而且ruby现在很慢 。 就好像在RVM中发生了一些变化,或者我安装了一些使Ruby编译版本性能更差的软件包。

我知道这是一个难以回答的问题,但是我应该研究一下为什么我的performance受到如此严重的损失呢?

编辑

我只是试图用ruby-build安装,安装的版本很快。 rvm在我的环境中做的东西很慢。

这个问题与RVM使用的一些默认设置有关。 两件事情有很大的不同,–disable-shared和–patch cflags.patch

cflags.patch只存在于1.9.3-p194和p286中,现在自动添加。

 rvm get head && rvm reinstall 1.9.3-p194 --disable-shared --debug 

你应该看到cflags.patch得到应用。

如果你还想要猎鹰补丁,你需要这样做:

 rvm get head && rvm reinstall 1.9.3-p194-perf --patch cflags.patch --patch falcon.diff --disable-shared --debug 

信息来自: https : //github.com/wayneeseguin/rvm/issues/1240