Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have my development rails codebase running on a VirtualBox virtual machine (Ubuntu 9.10 64-bit server) with the codebase mounted as a share (originally via SMB/CIFS but now as a VirtualBox shared folder) from my host machine (OS X 10.5.8).

The problem I'm having is that the "loading environment" stage of the rails bootstrap takes an age (60 seconds) e.g. when starting the server, running specs, rake tasks or script/console. The virtual machine has plenty of memory (512Mb, which it tends to use about 40% of).

I have quite a few config.gem entries in my environment file and removing all of those brings the script/console start time down to 20 seconds but as that throws errors due to missing things I don't think that's reliable.

Is there anything I should be looking at to improve the startup time or is it just something I'll have to live with for my largish application?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Ubuntu 9.10 has had a number of issues since release. I suspect that 9.10 was a bit rushed and there are still some rough edges. I've had issues with a 9.04->9.10 VMWare image that I upgraded, after which I found no sound, scrambled boot-time video, and other strange behavior (and yes, I updated the vmware drivers). Programs that ran fine on 9.04 refused to launch on 9.10, or would behave oddly. In contrast, my 9.04 images continue to operate just fine.

Is there any way you can migrate the setup to 9.04 for testing, and if so, does it run normally there? It could simply be a bug (or series of bugs) lurking in 9.10 that are causing the issue. Also, is there a version difference for the Ruby install you're using?

share|improve this answer
    
Did a fresh install with Ubuntu server 9.04 really brought the speed back - never thought that it would be a problem with 9.10. Thanks –  DEfusion Jan 7 '10 at 2:40

60 seconds is ridiculous for a Rails app startup. Even the monsters I deal with come up in 2-3 seconds. I don't have any specific recommendations (although the Italian plumbing you've got rigged up probably isn't helping -- perhaps do the job properly and deploy to the VM via Capistrano?) but it's not hard to watch the system while the app starts up and work out where the bottleneck is. I wrote a lengthy article for work on finding and fixing bottlenecks in systems, it'll give you something to do for a while, anyway.

share|improve this answer
    
Italian plumbing? –  DEfusion Jan 7 '10 at 1:01
    
I'm saddened that that term has gone out of fashion. Think of it as a Rube Goldberg machine for making your sewerage go away. –  womble Jan 7 '10 at 1:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.