Fixing a slow Ubuntu server – ipv6 slowness!

Often times, the fact that Ubuntu uses IPv6 in its default OS configurations, will rear up its head in a big bad way. The obvious symptoms will be as follows –

  1. Any hosted website will become excruciatingly slow. More the data, slower the website.
  2. SSH-ing into the server will take very long ( ~ 8-9 secs).
  3. Once logged in through SSH, you’ll notice that typing commands isn’t very fluid. The prompt will often freeze up.
  4. And finally, if physical access to the server is possible, then logging into the terminal and running a bunch of terminal commands feels anything but slow!

Once you’ve established these symptoms, here’s what all can be done –

  1. sudo vim /etc/sysctl.conf
  2. add the line => net.ipv6.conf.all.disable_ipv6 = 1
  3. then run “sysctl -p”
  4. sudo vim /etc/default/grub
  5. set the property GRUB_CMDLINE_DEFAULT_LINUX to “ipv6.disable=1” (if this property doesn’t exist, then add it. though this is quite unlikely.)

In this aspect, this particular post might be of some interest (be mindful, the site suffers from mild charset incompatibilities). The site basically explains why ipv6 makes a server slow, how did this situation come to be, what can be done, and finally, nothing much will be done any time soon. Might as well just disable it and get on with the goodness of ipv4.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s