Thank you so much for that, Alvaro.

If I understand correctly, this script disables ipv6 in the virtual machine. 
This helps with latency as it cuts out one thread that will ultimately fail. 
Turning off ipv6 on my machine has sped up normal URLs significantly.

And indeed, it does help with latency, if I’m using it correctly.

But I’m not sure how to actually use this code and have it always in force on 
my virtual machines.

What I have done is place your code in an .sh file and add the following to my 
Vagrantfile

   config.trigger.before [:up, :suspend, :halt, :destroy] do
   info "Turning off ipv6"
   run_remote  "bash /var/www/ipv6.sh"
 end

Maybe this is wrong, but it’s the only way I know how.

Anyway, Vagrant runs okay on vagrant up.

I don’t know how to verify if it turns off ipv6 on the VM or not.

Latency at this point is down to 4s, more or less. It’s not entirely 
consistent, but it’s better than it was.

Is this about as good as I can expect?

I want to try to enable rsync next, to see if this helps.

But to be honest, the 4s seems mostly a network delay. When action starts, it’s 
VERY fast.

If I could get rid of this 4s of latency I’d have a local dev environment for 
Wordpress that would be practically instantaneous.


best,
ian


> On Jul 24, 2017, at 10:58 AM, Alvaro Miranda Aguilera <[email protected]> 
> wrote:
> 
> Hello
> 
> You can domething like this in a script.
> 
> #!/usr/bin/env bash
> 
> mv /etc/sysctl.conf /etc/sysctl.conf.ori
> grep -v net.ipv6.conf /etc/sysctl.conf.ori | tee /etc/sysctl.conf
> echo "net.ipv6.conf.all.disable_ipv6=1" | tee -a /etc/sysctl.conf
> echo "net.ipv6.conf.default.disable_ipv6=1" | tee -a /etc/sysctl.conf
> 
> sysctl -p
> 
> 
> Alvaro.

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/A3BA4B29-92EE-464F-98DE-5348754E77FA%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to