[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Processed: destruction of round-robin functionality is fucking up our mirrors and making Debian suck for many people, hence fixing this is a release-critical "wish"



On Sat, Dec 15, 2007 at 03:43:22PM +0100, Josip Rodin wrote:
> At the same time, I should just get off my ass and go find the resolving
> code in the applications (apt-get, rsync, ...), and then just run it to see
> how it works...

I edited apt's methods/connect.cc:Connect() function after the line
saying "struct addrinfo *CurHost = LastHostAddr;" to do:

   char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];
   getnameinfo( CurHost->ai_addr, CurHost->ai_addrlen,
                        hbuf, sizeof(hbuf),           
                        sbuf, sizeof(sbuf),
                        NI_NUMERICHOST );
   char *msg;
   sprintf(msg, "\nUsing IP address: %s, with service %s\n", hbuf, sbuf);
   return _error->Error( msg );

Then I ran it with a minimal sources.list file including only security.d.o:

% for i in $(seq 1 30); do LD_LIBRARY_PATH=bin bin/apt-get -o "Dir::Etc::SourceList=$PWD/sources.list" -o "Dir::State::Lists=$PWD/foo" -o "Dir::Bin::Methods=$PWD/bin/methods" update 2>/dev/null | grep Using | sort -u; done | cut -d: -f2 | cut -d, -f1 | sort | uniq -c | sort -n
      8  212.211.132.32
     10  212.211.132.250
     12  128.31.0.36
% for i in $(seq 1 30); do LD_LIBRARY_PATH=bin bin/apt-get -o "Dir::Etc::SourceList=$PWD/sources.list" -o "Dir::State::Lists=$PWD/foo" -o "Dir::Bin::Methods=$PWD/bin/methods" update 2>/dev/null | grep Using | sort -u; done | cut -d: -f2 | cut -d, -f1 | sort | uniq -c | sort -n
      7  128.31.0.36
     11  212.211.132.250
     12  212.211.132.32
% for i in $(seq 1 30); do LD_LIBRARY_PATH=bin bin/apt-get -o "Dir::Etc::SourceList=$PWD/sources.list" -o "Dir::State::Lists=$PWD/foo" -o "Dir::Bin::Methods=$PWD/bin/methods" update 2>/dev/null | grep Using | sort -u; done | cut -d: -f2 | cut -d, -f1 | sort | uniq -c | sort -n
      6  212.211.132.32
     10  212.211.132.250
     14  128.31.0.36
% for i in $(seq 1 30); do LD_LIBRARY_PATH=bin bin/apt-get -o "Dir::Etc::SourceList=$PWD/sources.list" -o "Dir::State::Lists=$PWD/foo" -o "Dir::Bin::Methods=$PWD/bin/methods" update 2>/dev/null | grep Using | sort -u; done | cut -d: -f2 | cut -d, -f1 | sort | uniq -c | sort -n
      7  128.31.0.36
     11  212.211.132.32
     12  212.211.132.250
% for i in $(seq 1 30); do LD_LIBRARY_PATH=bin bin/apt-get -o "Dir::Etc::SourceList=$PWD/sources.list" -o "Dir::State::Lists=$PWD/foo" -o "Dir::Bin::Methods=$PWD/bin/methods" update 2>/dev/null | grep Using | sort -u; done | cut -d: -f2 | cut -d, -f1 | sort | uniq -c | sort -n
      8  212.211.132.250
     11  128.31.0.36
     11  212.211.132.32

Screwy... let's try a larger sample:

% for i in $(seq 1 99); do LD_LIBRARY_PATH=bin bin/apt-get -o "Dir::Etc::SourceList=$PWD/sources.list" -o "Dir::State::Lists=$PWD/foo" -o "Dir::Bin::Methods=$PWD/bin/methods" update 2>/dev/null | grep Using | sort -u; done | cut -d: -f2 | cut -d, -f1 | sort | uniq -c | sort -n
     30  212.211.132.250
     33  212.211.132.32
     36  128.31.0.36
% for i in $(seq 1 99); do LD_LIBRARY_PATH=bin bin/apt-get -o "Dir::Etc::SourceList=$PWD/sources.list" -o "Dir::State::Lists=$PWD/foo" -o "Dir::Bin::Methods=$PWD/bin/methods" update 2>/dev/null | grep Using | sort -u; done | cut -d: -f2 | cut -d, -f1 | sort | uniq -c | sort -n
     27  212.211.132.250
     34  212.211.132.32
     38  128.31.0.36
% for i in $(seq 1 99); do LD_LIBRARY_PATH=bin bin/apt-get -o "Dir::Etc::SourceList=$PWD/sources.list" -o "Dir::State::Lists=$PWD/foo" -o "Dir::Bin::Methods=$PWD/bin/methods" update 2>/dev/null | grep Using | sort -u; done | cut -d: -f2 | cut -d, -f1 | sort | uniq -c | sort -n
     32  212.211.132.250
     33  128.31.0.36
     34  212.211.132.32
% for i in $(seq 1 99); do LD_LIBRARY_PATH=bin bin/apt-get -o "Dir::Etc::SourceList=$PWD/sources.list" -o "Dir::State::Lists=$PWD/foo" -o "Dir::Bin::Methods=$PWD/bin/methods" update 2>/dev/null | grep Using | sort -u; done | cut -d: -f2 | cut -d, -f1 | sort | uniq -c | sort -n
     30  212.211.132.250
     32  212.211.132.32
     37  128.31.0.36
% for i in $(seq 1 99); do LD_LIBRARY_PATH=bin bin/apt-get -o "Dir::Etc::SourceList=$PWD/sources.list" -o "Dir::State::Lists=$PWD/foo" -o "Dir::Bin::Methods=$PWD/bin/methods" update 2>/dev/null | grep Using | sort -u; done | cut -d: -f2 | cut -d, -f1 | sort | uniq -c | sort -n
     31  212.211.132.32
     32  212.211.132.250
     36  128.31.0.36

That's a bit less screwy, although it's a bit more consistently tilting in
the direction of steffani.

On that note, let me update that other bit:

> Right now, with a small sample of just some 110 minutes, the machine eth0s
> have been averaging:
> * villa: 4.69 MB/s
> * lobos: 4.08 MB/s
> * steffani: 15.14 MB/s

After around 11 hours, we've had:
* villa 4.29 MB/s
* lobos 3.91 MB/s
* steffani 14.86 MB/s

That would be 64% for steffani... :/

-- 
     2. That which causes joy or happiness.


Reply to: