Testing on Linux VM on winXP 3 times faster than XP


#1

Hello,

Informational post in case any windows developers are interested.

I had heard that ruby on a linux VM running on windows can be faster
than on that same install of windows.

I recently got fed up waiting 1min & 30secs for my unit and functional
tests to run for a small project (no integration tests yet), and the
big lurching pause that happens when running rails in development mode
on my Pentium-M 1.7Ghz laptop, I decided to try a linux VM running in
the free VMWare player, specifically those provided by jumpbox.com
(debian/ubuntu I think) which are supposed to be production ready
linux VMs.

I probably should have tried a different VM as I had a lot of hassle
installing and configuring postgres instead of the supplied mysql: I’m
a bit of a newbie at this linux business and installing rails would
have been easier. In anycase it was a waste of time since switching
the linux VM rails project to use my windows postgres server just for
fun turned out 20% faster?!?! Note, don’t use a netbios name in the
rails database config: use the machine’s ip address else bizarre
behaviour.

All in all “rake test” dropped from 90secs to a mind blowing 30secs.

The actual tests themselves run between 2 and 3 times faster, but it
seems to be initialization that takes the bulk of the time.

I prefer my windows tools (specifically Notepad++, even though it
still doesn’t understand rhtml and haml files) and windows explorer,
so I am now developing with my project folders on the windows computer
but ‘mounted’ to a folder in the linux VM running rails, configured to
use my windows postgres server. The VM uses about 250 megs of RAM
having disabled mysql and other stuff.

If you have zero linux experience and want to try the above then I
would recommend finding a VM that has all that you need already
installed (recentish version of rails requiring some simple gem
updating and the database, for example). Learning linux from scratch
in order to setup a system, as I have done, is a lot of hassle.
Otherwise prefer apt-get over manually installing, and learn linux
security before all else. And download winSCP.


#2

itsastickup wrote:

I had heard that ruby on a linux VM running on windows can be faster
than on that same install of windows.

You should try Vista. I experimented with Qemu and Puppy-Linux
recently, and everything was faster.

Microsoft has nobody to blame but themselves for their market erosion
and incredibly bad software.

(I’m posting this from Kubuntu now, thank you.)

The actual tests themselves run between 2 and 3 times faster, but it
seems to be initialization that takes the bulk of the time.

Right - the program loader is pathetic. It assumes we want to load MS
Office, once, and live inside it for a while. It can’t comprehend
scripts that call many small executables.


Phlip


#3

Phlip wrote:

Right - the program loader is pathetic. It assumes we want to load MS
Office, once, and live inside it for a while. It can’t comprehend
scripts that call many small executables.

Is it just the loader that is slow? Or is there something that can be
done in the way of passing extra information (such as fully qualified
paths or something) that would help. I don’t want to start a discussion
about the “better OS” or “quit Windows”, etc. but given the install base
of Windows, it would be good to know if there are things that one could
investigate to speed up Ruby on Windows.

Cheers,
Mohit.
2/9/2009 | 11:13 AM.


#4

Can you please elaborate on the setup you mentioned?

I am ashamed to.

You should try Vista. I experimented with Qemu and Puppy-Linux
recently, and everything was faster.

I like some of Vista’s toys. Things like a functional Hibernate mode.

So I tried qemu-puppy on a USB drive. It worked great, but SeaMonkey,
the only functioning browser, instantly died with a silly .so file
error as soon as I ever tried to do anything. So, instead of
dedicating the rest of my career to learning how to mix and match
puppy sfs files (with the usual impossible online forum support), I
just switched to a dual-boot with Kubuntu. It will do fine with half a
hard-drive.

When puppy, in qemu, possibly with kqemu, was doing things like
building Ruby in less than a minute, instead of 15 minutes or so. Of
course the Kubuntu is faster.

Any volunteers to go work for MS? To help them clean up their
codebase? I didn’t think so… (-:


Phlip


#5

So in the end you gave up on the virtual machine and are running Linux
directly, is that it?

Cheers, Sazima


#6

Phlip,

Can you please elaborate on the setup you mentioned?

You should try Vista. I experimented with Qemu and Puppy-Linux
recently, and everything was faster.

Cheers, Sazima