Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 worser 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. Thanks!

share|improve this question
    
No, apt does not use wget. It uses its own internal method. –  Faheem Mitha Jan 31 '12 at 5:17

2 Answers 2

up vote 7 down vote accepted

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.

share|improve this answer
3  
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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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