zoukankan      html  css  js  c++  java
  • 解决vagrant上使用Homestead很慢(响应速度10s+)

    说明:

      使用vagrant和Homestead 在vBox上面跑laravel, 响应速度非常缓慢(大概在10+s),

      尝试过增加虚拟机配置, 但是没有任何效果, 经验证也不是数据库的原因 .

      通过网上查询了解到, 是因为VirtualBox的IO引起的: http://mitchellh.com/comparing-filesystem-performance-in-virtual-machines

     

    解决方法1:

      在Homestead.yaml下添加type:nfs, 注意空格, map对应windows下面的物理路径

    解决方法2:
      如果上诉方法, 还是不能增加响应速度(我的就是), 则尝试以下方法
      安装一个vagrant 插件


      

    $ vagrant plugin install vagrant-winnfsd


      然后修改 Homestead/scripts/homestead.rb 的代码, 循环部分替换成如下:

    重启vagrant 之后, 响应速度已经将至 200 ms


    ----------参考资料
    https://laracasts.com/discuss/channels/general-discussion/for-those-who-find-homesteadvagrantvirtualbox-slow-on-windows?page=1
    http://mitchellh.com/comparing-filesystem-performance-in-virtual-machines

  • 相关阅读:
    Github国内mirror加速
    通过node-inspector或VSCode调试服务器上代码
    node nvm 常见命令
    HBuilderX 修改默认的终端
    LLVM 工具使用
    LLVM 获取Value Type
    LLVM Constant Value to c++ value
    Bison 命名位置
    llvm block
    vscode use cl.exe build C/C++
  • 原文地址:https://www.cnblogs.com/Skrillex/p/8087141.html
Copyright © 2011-2022 走看看