简体   繁体   English

VirtualBox上的Rails服务器运行速度非常慢

[英]Rails server on VirtualBox is running really slow

My local Rails server is running excruciatingly slow. 我的本地Rails服务器运行速度非常慢。 The setup: Ubuntu server in VirtualBox, and Windows can SSH and access HTTP port 3000. Memory allocated is 1.5GB, but the page is still responding really slow in my Windows 7 browser. 设置:VirtualBox中的Ubuntu服务器,Windows可以SSH并访问HTTP端口3000。分配的内存为1.5GB,但是在我的Windows 7浏览器中,页面的响应速度仍然很慢。

Any thoughts on this? 有什么想法吗? (I might be one of the really few people who's using this setup...) (我可能是使用此设置的少数几个人之一...)

I managed to solve this problem by switching from Webrick to another Rails server (can't remember which one anymore), simple as that. 我设法通过从Webrick切换到另一台Rails服务器(不再记得哪台)来解决这个问题,就这么简单。

Webrick might not necessarily be the problem though, because later when I switched back to it, the server run just fine without any sluggishness. Webrick不一定是问题所在,因为稍后再切换回该服务器时,服务器运行良好,没有任何呆滞。

Looks like this could be one of a couple issues: 看起来这可能是几个问题之一:

  1. Webrick reverse DNS lookups are slowing you down: Webrick is very slow to respond. Webrick反向DNS查找使您减速: Webrick响应速度非常慢。 How to speed it up? 如何加快速度?

  2. You're using a VirtualBox shared folder, and vboxfs is very slow: Rails VERY slow in development using Ubuntu VVM 您正在使用VirtualBox共享文件夹,而vboxfs却非常慢: Rails使用Ubuntu VVM的开发速度非常慢

After you created your vm make sure that you install the Guest Additions! 创建虚拟机后,请确保安装来宾添加项!

It lets you use your virtual machine at fullscreen and it also adds extras kernel modules to get better performance. 它使您可以全屏使用虚拟机,并且还添加了额外的内核模块以获得更好的性能。

once in your VM on the above menu click devices and click insert guest editions cd image.. then go to my computer and find that image, should be cd, double click and it should load 在上述菜单中的VM中单击一次设备,然后单击插入来宾版本cd映像。.然后转到我的计算机,找到该映像,应为cd,双击并加载

that worked for me, good luck 对我有用,祝你好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM