Rails使用Ubuntu VVM的开发速度非常慢 [英] Rails VERY slow in development using Ubuntu VVM

查看:87
本文介绍了Rails使用Ubuntu VVM的开发速度非常慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有以下配置

在VirtualBox VM上运行的Ubuntu服务器10.04(RAM和CPU使用率较低)
ruby​​ 1.9.3
rails 3.2.12
webrick

Ubuntu server 10.04 running on a VirtualBox VM (RAM and cpu usage are low) ruby 1.9.3 rails 3.2.12 webrick

如果我在系统下方执行任何操作,似乎要等待15秒钟才能执行命令
-rake taks
-rails s
-导航至应用程序中的新页面

If I do any of the things below the system seems to wait for about 15 seconds before executing the command - rake taks - rails s - navigating to a new page in the app

我看过
的东西-这是在链轮部分之前,并且与rake相同,因此,目前我不关注诸如dev-tweaks
之类的东西-我将webrick config.rb更改为:DoNotReverseLookup => true
-我在VM上有我的主机的主机条目。两台机器之间的ping速度非常快
-我尝试过Thin并经历了相同的问题。我没有尝试过杂种,但我想我会看到同样的东西。

Things I have looked at - this is before the sprockets section, and does the same with rake, so at the moment I am not looking at things such as dev-tweaks - I have changed the webrick config.rb to have the line :DoNotReverseLookup => true - I have host entries for my host machine on the VM. ping is very fast between both machines - I have tried Thin and experienced the same issue. I haven't tried mongrel but am thinking I will see the same

但是它仍然非常慢。

有任何想法吗?

Michael

推荐答案

如果您使用的是VirtualBox共享文件夹(vboxfs),磁盘I / O可能是问题。
vboxfs确实很慢,并且Ruby on Rails在开发模式下会执行很多文件操作(检查是否有文件更改等)。

If you're using VirtualBox shared folders (vboxfs), disk I/O is probably the issue. vboxfs is really slow, and Ruby on Rails does a lot of files operations in development mode (checking if any files changed etc.).

如果不使用Windows,则可以使用NFS共享文件夹。

If you're not using Windows, sharing folders with NFS is the way to go.

检查此链接:
http://meta.discourse.org/t/shared-folder-performance-on-vagrant/2443/14

这篇关于Rails使用Ubuntu VVM的开发速度非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆