Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant rsync is super slow

Tags:

vagrant

rsync

I have this in vagrantfile:

config.vm.synced_folder ".", "/vagrant",
type: "rsync", rsync__auto: true, rsync__exclude: [".git/", "django/"]

+ I run vagrant rsync-auto in separate tab.

After making changes to file it takes vagrant ~5s to pick it up and rsync.

Anyway to speed this up? I am using it for webpack/hot-module-reloading.

like image 334
Nema Ga Avatar asked Jun 28 '16 17:06

Nema Ga


1 Answers

There is a slightly outdated plugin called vagrant-gatling-rsync which is meant to solve this situation.

https://github.com/smerrill/vagrant-gatling-rsync

You should be able to install it using

$ vagrant plugin install vagrant-gatling-rsync

You can then (optionally) add this to your Vagrantfile:

config.gatling.rsync_on_startup = true

The above line should not be needed any more, as this is the default behaviour of the plugin.

You should be able to trigger this functionality by replacing your existing $ vagrant rsync-auto command with the matching one from the plugin:

$ vagrant gatling-rsync-auto

In my personal experience, I have not found any issues with the built-in version of Vagrant's rsync since version 1.9.0 or so, however this may help in your situation.

like image 105
Brian Brownton Avatar answered Jan 03 '23 23:01

Brian Brownton