11

Should I use http or ftp links in /etc/apt/sources.list?

What I mean is is using something like

deb ftp://ftp.debian.org/debian/ squeeze main contrib. non-free
deb-src ftp://ftp.debian.org/debian/ squeeze main contrib. non-free

better or worse than using

deb http://ftp.debian.org/debian/ squeeze main contrib. non-free
deb-src http://ftp.debian.org/debian/ squeeze main contrib. non-free

?

I guess as apt uses wget to fetch things, this is same as asking if wget is faster on ftp.

  • No, apt does not use wget. It uses its own internal method. – Faheem Mitha Jan 31 '12 at 5:17
13

You're not going to save much time using one over the other, but if efficiency is what you care about, use HTTP. An FTP client has to send a username and password and receive acknowledgments for those, and then issue several commands to set up the file transfer and receive acks for those, too. All this back and forth magnifies the effect of network latency; with 100-200ms ping times to the server you could waste a second setting up the transfer. With HTTP, the client opens the connection, sends one command and the file transfer starts immediately.

  • 6
    Always use HTTP. We need to discourage the use of FTP so that it can be made obsolete sooner. – Michael Dillon Feb 1 '12 at 7:57
0

Well, personnally I would go with FTP (stands for File Transfer Protocol) whose primary goal is... file transfer. But if you want to be sure, like empirically sure, there are a few utilities that might do the job (i.e. test, compare and select the fastest ones) for you. Those I know of are netselect-apt (same package name) and apt-spy. You don't have to give them a server list as they will download it from Debian main server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.