We switched to a new development server and experienced that our test suite needs two times as much time. We tested database, filesystem etc. but these things are pretty fast, even faster than before.
So we wrote a small ruby benchmark test (Fibonacci) and executed it several times (average below):
time_start = Time.now
f = lambda { |x| x < 2 ? x : f.call(x-1) + f.call(x-2) }
f.call(35)
time = Time.now - time_start
puts "#{time.round(4)}s needed"
Machine before with XEN: 6s
Machine after with OpenVZ: 11,5
On both machines is Debian Squeeze with rvm installed (-> compiled) ruby-1.9.3-p194. There is no high load on these machine, memory is also ok.
The more or less only difference is virtualization engine. In production we use VMware ESXi. The benchmark needs about 11s there. We tested another server with KVM, there the benchmark needs 2,5s.
So what can we change in our virtualization to make our ruby faster? Or do you have another idea what the problem can be?
I just tested it on our ESXi 5 System with Debian Squeeze and one with Ubuntu Precise (Server). On Squeeze Ruby-1.9.3-p194 has to be compiled and on Ubuntu not. But the Results are the same on both systems: 11.x Seconds. So i think we can also ignore the Kernel-Version and concentrate on the Virtualization Layer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With