Hacker News new | ask | show | jobs
by laurent92 2071 days ago
apt-get.

More precisely, the repos; When you activate IPv6 on Debian, then apt-get (the package manager) is extremely slow. This is because it first tries to reach a repo in IPv6, then after 30s falls back to IPv4. If you disable IPv4, it is lightening fast. Many services behave the same way, to the point that computers are generally faster on IPv4.

Maybe it changed recently but it wasn’t the case for the last 10 years and I’ve quit trying, and I’m not knowledgeable enough to configure the Debian system far from the defaults.

Edit: Maybe it is my ISPs who don’t support IPv6, which makes it hard to improve because the problem is invisible for, for example, Debian developers who work on IPv6 support.

3 comments

Not sure about Debian, but all of the Ubuntu apt / package manager servers work quickly and reliably over IPv6 and have for some time.
You can modify /etc/gai.conf to prefer IPv4 over IPv6; cf. gai.conf(5).
Which is why the first commands to run on a Linux installation are

    sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
    sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
note that this is a runtime config. drop it somewhere in /etc/sysctl.d/ to make it permanent.