We've built a vagrant box for our development box and we are facing some latency issues.
Issues:
- Assetic:watch is being slow
- Overall application access in (app_dev.php) is slow
- Using "find" command in the shared folder on the vagrant box is super slow
About the box:
- Running on virtualbox (running on both Mac and Linux)
- LAMP env (ubuntu)
- Big code base (10K+ files)
- Symfony 2 application
Things done to improve perfs:
- Use of NTFS (using bindfs)
- Vagrant configs:
config.vm.synced_folder "#{folder['source']}", "/mnt/vagrant-#{i}", id: "#{i}", type: 'nfs', mount_options: ['rw', 'vers=3', 'tcp', 'fsc' ,'actimeo=2']
- Move cache and logs out of the shared folder (AppKernel update)
We can clearly see that any time a file from the shared folder is accessed the "bindfs" process is eating a lot of cpu.
First of all is that normal? I was expecting vagrant to copy files on the box an whenever those files were being accessed things were done locally.
We can see that the box itself works fine as when accessing cache data (outside of shared folder) things are going fast enough so what can I do to improve the box performances and avoid those latency issue?