0

Here is a mail in /var/mail/root which I received in my server logs http://paste.ubuntu.com/532874/ I see same packages downloaded many times again and again. The servers which are upgrading are total 5 (4 virtual machines and one host) so is there a way I can save bandwidth on this sort of setup.

Bond
  • 781
  • 4
  • 12
  • 22
  • Hi many thanks to you all for the suggestions.I have found a cool solution mentioning here so that if some one comes by chance should help them http://blog.dustinkirkland.com/2010/11/yet-another-ubuntu-archive-proxy.html Ya I am micro optimizing the thing.This is a pilot project which in my work place if successful would be used to convert a large scale deployment of servers to Linux. – Bond Nov 18 '10 at 05:31

3 Answers3

2

Create apt-cacher on one of the boxes and then point sources.list to your caching proxy. Apt-cacher only downloads requested packages, so no disk space of bandwidth is wasted.

Kristaps
  • 2,985
  • 17
  • 22
2

As the packages are picked up via HTTP you could setup a caching proxy like Squid and have the servers set to update via that by setting the relevant option in your apt.conf.

You could also use services that specifically optimized for caching packages for apt, but be careful with these if you might have a mix of Debian and Ubuntu machines working through the same proxy. A general HTTP proxy may help you reduce the bandwidth footprint of other incoming services too without having several different proxy services running (I believe Yum uses HTTP too, as do many other service update procedures like clamav's pattern data updates and so forth.

Though really the amount of bandwidth used by regular apt/yum updates isn't all that high by modern standards unless you have a very slow (or very expensive) connection. The only time you would really notice a big difference is installing a fresh machine, when there might be a large backlog of package updates to download from between now and when the CD (or ISO image) you are installing from was created. The extra hassle of running a proxy and making sure the machines use it might cost you more in admin time than it will ever be worth in terms of savings due to reduced bandwidth use and download time. If your concerned is that all the machines could try updating at the same time and so saturate your incoming connection for a time, just make sure such admin tasks (and/or cron jobs) are staggered so one machine finishes before the next starts.

David Spillett
  • 22,754
  • 45
  • 67
1

You could set up your own mirror I suppose, or find some way to pre-populate the packages into the staging area.

The real question is, do you pay for bandwidth or are you just micro-optimizing?

Michael Graff
  • 6,668
  • 1
  • 24
  • 36
  • 1
    A local mirror could work. If there's no easy way of setting one up then a caching proxy might do the trick as a 'cheat's' way of achieving the same result. – Rob Moir Nov 16 '10 at 10:18