linux虚拟机运行慢,VirtualBox上的Linux虚拟机突然运行缓慢

我正在使用Virtual Box运行虚拟机(版本4.2.26,但与v4.3.14有相同的问题)

I am running a VM using Virtual Box (version 4.2.26, but had same issue with v4.3.14)

VM是使用Vagrant创建的。 它运行无头,它只是提供网站,我使用"vagrant ssh"。 到达命令行。

The VM was created using Vagrant. It runs headless, it just serves up websites and I use "vagrant ssh" to get to the command line.

两周前它运行得非常好,然后我重新启动了我的计算机,现在它的运行速度非常慢。

It was running perfectly fine two weeks ago, then I restarted my computer and now it runs ridiculously slow for some things.

1. ls和cd命令在它们之前有明显的1秒延迟 做任何事情,我被砸了。

2. 加载来自的网页需要30到45秒 VM(如果脚本访问MySQL)。 这些页面 过去需要不到一秒的时间来加载。

3. "vagrant up" 曾经采取过 几秒钟加载VM,现在需要将近5分钟。

1. The ls and cd commands have a noticeable 1 second delay before they do anything and I am sshed in.

2. It takes 30 - 45 seconds to load a webpage served from the VM (if the script accesses MySQL). These pages used to take less than a second to load.

3. "vagrant up" used to take a couple seconds to load the VM, now it takes almost 5 minutes.

我已经多次重建VM了。 我已经卸载了VirtualBox并重新安装了它(最新版本和匹配.box映像版本的版本)

I've rebuilt the VM several times. I've uninstalled VirtualBox and reinstalled it (both the newest version and the version that matches the .box image's version)

当一切正常并且开始变慢时,没有代码/数据库差异。

There is no code/database differences between when everything worked fine and when it started going slow.

MySQL也在VM上运行(MySQL,Apache和Nginx正在VM上运行)。

MySQL is also running on the VM (MySQL, Apache, and Nginx are running on the VM).

mysql CLI快速响应。 远程连接到VM的MySQL Workbench可以快速从DB获得结果。

The mysql CLI responds quickly. And MySQL Workbench connected remotely to the VM gets results from the DB quickly.

traceroute告诉我,我的脚本应该在本地直接连接到MySQL,而不是在VM之外路由。

traceroute tells me that my scripts should be connecting directly to MySQL locally and are not getting routed outside of the VM.

一个普通的.html或.php文件很快加载。 只有当脚本连接到数据库时才会变慢。

A plain old .html or .php file loads quickly. Only if the script connects to the DB does it go slow.

运行VM的我的电脑工作正常。 而且即使重启后我也有这个速度问题,并且只是试图自己运行VM。

My PC that is running the VM is working fine. And I have this speed issue even after a reboot and only attempting to run the VM by itself.

我如何调试这样的东西?

How do I even debug something like this?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值