Slow symfony program speed solution in vagrant environment

Source: Internet
Author: User
In the vagrant environment, the symfony program is slow. Recently, a symfony program was written. in the beginning, a simple web server was started to access the program through the console server: run command on Mac, however, the php provided by Mac itself does not have the memcached extension. Therefore, this program is put into vagrant. However, it is found that the access speed is very slow and it takes about 10 seconds to create an extremely simple page, so I searched and found that someone encountered the same problem.

Slow symfony program speed solution in vagrant environment

Several schemes listed in this article: http://leo108.com/pid-2196.asp

  1. Use vagrantv1.2. (this is not suitable for visual testing. more than 1.7 is available now)
  2. Mount a Directory using NFS
  3. The Vbox Guest Additions version in the vagrant virtual machine is the same as the virtual box version (my current environment is the same)
  4. Use opcache extension (apc has been installed in my current Environment)
  5. Disable xdebug and xphrof extensions (my current environment is closed)

In this case, you can only try the NFS mode. according to the configuration in the vagrant document, OS X comes with nfsd, saving the trouble of installation. you only need to modify the vagrantfile.

Symfony

Add two lines to vagrantfile:

Http://leo108.com/pid-2196.asp

Config. vm. network: private_network, type: dhcpconfig. vm. synced_folder ".", "/vagrant", type: "nfs"

Restart the vagrant virtual machine vagrant reload.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.