Memilih mirror “tercepat” di Debian :)

Bagi yang menggunakan internet koneksi “pas-pasan”, semisal saya pribadi, kadang menyebalkan juga memiliki koneksi lola (alias: loading lama banget πŸ™‚ ). Ada beberapa cara tentunya agar bisa mendapatkan koneksi yang baik, bisa dengan pindah jaringan ke yang lebih bagus, pakai perangkat yang lebih bagus, paket internet “premium”, atau memakai sistem yang efisien dan cepat. Di OS Debian/Linux(dan turunannya) yang intensive menggunakan koneksi internet, tentu menjadi kepusingan tersendiri jika koneksinya lola :).
Salah satu cara menanganinya adalah dengan menggunakan repository yang lebih cepat (“dekat”). Secara logis, menggunakan repository yang lebih cepat akan mendapatkan hasil koneksi yang lebih baik :). Debian sudah menyediakan tool netselect-apt yang bisa digunakan untuk memilih repository tercepat.
Dari keterangannya netselect-apt merupakan

This package provides a utility that can choose the best Debian mirror by downloading the full mirror list and using netselect to find the fastest/closest one.
It can output a sources.list(5) file that can be used with package management tools such as apt or aptitude.

Saya mencoba mengambil dari repository lokal dari sekitar penulis, yang pertama mengambil dari mirror UGM Yogyakarta, http://repo.ugm.ac.id/debian,

~$ sudo apt-get update
Get:1 http://security.debian.org stable/updates Release.gpg [836 B]                
Ign http://security.debian.org/ stable/updates/contrib Translation-en              
Get:2 http://repo.ugm.ac.id stable Release.gpg [1,672 B]                
.....................
Ign http://security.debian.org/ stable/updates/contrib Translation-en_US
Get:3 http://repo.ugm.ac.id stable Release [87.3 kB]
Ign http://security.debian.org/ stable/updates/main Translation-en
Ign http://security.debian.org/ stable/updates/main Translation-en_US                                                                                                 
........................                                                                                          
Get:7 http://security.debian.org stable/updates/contrib amd64 Packages [674 B]                                                                                        
Get:8 http://security.debian.org stable/updates/non-free amd64 Packages [14 B]                                                                                        
Get:9 http://repo.ugm.ac.id stable/main amd64 Packages [6,540 kB]                                                                                                     
Get:10 http://repo.ugm.ac.id stable/main amd64 Packages [6,540 kB]                                                                                                    
Get:11 http://repo.ugm.ac.id stable/contrib amd64 Packages [53.0 kB]                                                                                                  
Get:12 http://repo.ugm.ac.id stable/non-free amd64 Packages [102 kB]                                                                                                  
Fetched 7009 kB in 2min 49s (42 kB/s)                                                                                                                                  
Reading package lists... Done

dan yang kedua mengambil dari mirror UNS Solo, http://bos.fkip.uns.ac.id/debian,

$ sudo apt-get update
Get:1 http://bos.fkip.uns.ac.id stable Release.gpg [1,672 B]                                                                               
Ign http://bos.fkip.uns.ac.id/debian/ stable/contrib Translation-en                                                                        
Ign http://bos.fkip.uns.ac.id/debian/ stable/contrib Translation-en_US
Ign http://bos.fkip.uns.ac.id/debian/ stable/main Translation-en                   
Ign http://bos.fkip.uns.ac.id/debian/ stable/main Translation-en_US                
Ign http://bos.fkip.uns.ac.id/debian/ stable/non-free Translation-en               
Ign http://bos.fkip.uns.ac.id/debian/ stable/non-free Translation-en_US            
Get:2 http://bos.fkip.uns.ac.id stable Release [87.3 kB]                           
Get:3 http://security.debian.org stable/updates Release.gpg [836 B]                        
Ign http://security.debian.org/ stable/updates/contrib Translation-en                                  
Ign http://security.debian.org/ stable/updates/contrib Translation-en_US                     
...................
Get:4 http://bos.fkip.uns.ac.id stable/main amd64 Packages [6,540 kB]
Ign http://security.debian.org/ stable/updates/non-free Translation-en_US                    
Get:5 http://security.debian.org stable/updates Release [38.4 kB]                            
Get:6 http://security.debian.org stable/updates/main amd64 Packages [165 kB]                                                                                          
Get:7 http://packages.dotdeb.org stable Release.gpg [836 B]                                                                                                           
Ign http://packages.dotdeb.org/ stable/all Translation-en                                                                                                             
Ign http://packages.dotdeb.org/ stable/all Translation-en_US                                                                                                          
Get:8 http://packages.dotdeb.org stable Release [2,203 B]                                                                                                             
Get:9 http://packages.dotdeb.org stable/all amd64 Packages [16.9 kB]                                                                                                  
Get:10 http://security.debian.org stable/updates/contrib amd64 Packages [678 B]                                                                                       
Get:11 http://security.debian.org stable/updates/non-free amd64 Packages [14 B]                                                                                       
Get:12 http://bos.fkip.uns.ac.id stable/contrib amd64 Packages [53.0 kB]                                                                                              
Get:13 http://bos.fkip.uns.ac.id stable/non-free amd64 Packages [102 kB]                                                                                              
Fetched 7,009 kB in 2min 45s (42.4 kB/s)                                                                                                                              
Reading package lists... Done

Walaupun tidak menggambarkan “kenyataan sebenarnya” tapi setidaknya dari kedua mirror yang saya anggap terdekat dari lokasi penulis, tidak ada “perbedaan” yang jauh dalam hal kecepatan download.

  • Installasi
  • $ sudo aptitude install netselect-apt
    The following NEW packages will be installed:
      netselect{a} netselect-apt 
    0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    Need to get 35.7 kB of archives. After unpacking 176 kB will be used.
    Do you want to continue? [Y/n/?] y
    Get:1 http://ftp.cn.debian.org/debian/ stable/main netselect amd64 0.3.ds1-14 [25.2 kB]
    Get:2 http://ftp.cn.debian.org/debian/ stable/main netselect-apt all 0.3.ds1-14 [10.5 kB]
    Fetched 35.7 kB in 7s (4,817 B/s)     
    Preconfiguring packages ...
    Selecting previously deselected package netselect.
    (Reading database ... 103465 files and directories currently installed.)
    Unpacking netselect (from .../netselect_0.3.ds1-14_amd64.deb) ...
    Selecting previously deselected package netselect-apt.
    Unpacking netselect-apt (from .../netselect-apt_0.3.ds1-14_all.deb) ...
    Processing triggers for man-db ...
    Setting up netselect (0.3.ds1-14) ...
    Setting up netselect-apt (0.3.ds1-14) ...
    

  • Test netselect-apt

  • Mari kita mencoba menggunakan tool ini. Lebih lengkapnya bagaimana menggunakan tool ini, baca man netselect-apt πŸ™‚

    $ sudo netselect-apt -o sources.list-1
    Using distribution stable.
    Retrieving the list of mirrors from www.debian.org...
    
    --2011-11-16 13:37:28--  http://www.debian.org/mirror/mirrors_full
    Resolving www.debian.org... 200.17.202.197, 206.12.19.7, 82.195.75.97, ...
    Connecting to www.debian.org|200.17.202.197|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 296643 (290K) [text/html]
    Saving to: β€œ/tmp/netselect-apt.mo0NsA”
    
    100%[=============================================================================================================================>] 296,643     45.0K/s   in 6.3s    
    
    2011-11-16 13:37:40 (46.0 KB/s) - β€œ/tmp/netselect-apt.mo0NsA” saved [296643/296643]
    
    Choosing a main Debian mirror using netselect.
    netselect: unknown host mirror.pacific.net.au               
    netselect: 329 (23 active) nameserver request(s)...       
    Duplicate address 203.0.178.32 (http://ftp.iinet.net.au/debian/debian/, http://ftp.netspace.net.au/pub/debian/); keeping only under first name.
    netselect: 313 (24 active) nameserver request(s)...       
    Duplicate address 202.141.160.110 (http://ftp.cn.debian.org/debian/, http://debian.ustc.edu.cn/debian/); keeping only under first name.
    netselect: 302 (23 active) nameserver request(s)...       
    ..............................
    ..............................
    netselect: 24 (22 active) nameserver request(s)...       
    Duplicate address 199.6.12.70 (http://199.6.12.70/debian/, http://mirror.mycre.ws/debian/); keeping only under first name.
    Running netselect to choose 1 out of 342 addresses.      
    .................................................................................................................................................................................................................................................................................................................
    The fastest server seems to be:
            http://ftp.tku.edu.tw/debian/
    
    Writing sources.list-1.
    Done.
    

    Percobaan pertama, netselect-apt merekomendasikan repository dari Taiwan, http://ftp.tku.edu.tw/debian/. Mari kita ubah sources.list yang ada agar menggunakan mirror tersebut

    $echo deb http://ftp.tku.edu.tw/debian/ stable main contrib non-free | sudo tee -a /etc/apt/sources.list
    $sudo nano /etc/apt/sources.list

    kasih tanda # pada mirror yang yang akan dinonaktifkan, dan akan menggunakan mirror Taiwan tadi, kemudian coba update

    $ sudo apt-get update
    Get:1 http://security.debian.org stable/updates Release.gpg [836 B]                        
    Ign http://security.debian.org/ stable/updates/contrib Translation-en                                  
    Ign http://security.debian.org/ stable/updates/contrib Translation-en_US                    
    Ign http://security.debian.org/ stable/updates/main Translation-en    
    Ign http://security.debian.org/ stable/updates/main Translation-en_US 
    Ign http://security.debian.org/ stable/updates/non-free Translation-en
    Ign http://security.debian.org/ stable/updates/non-free Translation-en_US
    Get:2 http://security.debian.org stable/updates Release [38.4 kB]     
    Get:3 http://security.debian.org stable/updates/main amd64 Packages [165 kB]                          
    Get:4 http://ftp.tku.edu.tw stable Release.gpg [1,672 B]                                                                                                              
    Ign http://ftp.tku.edu.tw/debian/ stable/contrib Translation-en                                                                                                       
    Ign http://ftp.tku.edu.tw/debian/ stable/contrib Translation-en_US                                                                                                    
    Ign http://ftp.tku.edu.tw/debian/ stable/main Translation-en                                                                                                          
    Ign http://ftp.tku.edu.tw/debian/ stable/main Translation-en_US                                                                                                       
    Get:5 http://packages.dotdeb.org stable Release.gpg [836 B]                                                                                                           
    Ign http://ftp.tku.edu.tw/debian/ stable/non-free Translation-en                                                                                                      
    Ign http://ftp.tku.edu.tw/debian/ stable/non-free Translation-en_US                                                                                                   
    Get:6 http://ftp.tku.edu.tw stable Release [87.3 kB]                                                                                                                  
    Ign http://packages.dotdeb.org/ stable/all Translation-en                                                                                                             
    Ign http://packages.dotdeb.org/ stable/all Translation-en_US                                                                                                          
    Get:7 http://security.debian.org stable/updates/contrib amd64 Packages [678 B]                                                                                        
    Get:8 http://packages.dotdeb.org stable Release [2,203 B]                                                                                                             
    Get:9 http://security.debian.org stable/updates/non-free amd64 Packages [14 B]                                                                                        
    Get:10 http://packages.dotdeb.org stable/all amd64 Packages [16.9 kB]                                                                                                 
    Get:11 http://ftp.tku.edu.tw stable/main amd64 Packages [6,540 kB]                                                                                                    
    Get:12 http://ftp.tku.edu.tw stable/contrib amd64 Packages [53.0 kB]                                                                                                  
    Get:13 http://ftp.tku.edu.tw stable/non-free amd64 Packages [102 kB]                                                                                                  
    Fetched 7,009 kB in 2min 46s (42.2 kB/s)                                                                                                                              
    Reading package lists... Done
    

    Dan ternyata dibanding dua repository lokal "unofficial" tersebut di atas, speed downloadnya hampir sama, padahal repository yang digunakan adalah dari Taiwan.
    Kemudian kita test netselect-apt lagi, apakah tetep menggunakan repo yang sama

    $ sudo netselect-apt -o sources.list-2
    Using distribution stable.
    Retrieving the list of mirrors from www.debian.org...
    
    --2011-11-16 13:52:38--  http://www.debian.org/mirror/mirrors_full
    Resolving www.debian.org... 206.12.19.7, 82.195.75.97, 86.59.118.148, ...
    Connecting to www.debian.org|206.12.19.7|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 296643 (290K) [text/html]
    Saving to: β€œ/tmp/netselect-apt.orxr2i”
    
    100%[=============================================================================================================================>] 296,643     45.1K/s   in 6.4s    
    
    2011-11-16 13:52:52 (45.0 KB/s) - β€œ/tmp/netselect-apt.orxr2i” saved [296643/296643]
    
    Choosing a main Debian mirror using netselect.
    netselect: 323 (23 active) nameserver request(s)...       
    Duplicate address 70.38.0.135 (http://debian.mirror.iweb.ca/debian/, http://70.38.0.135/debian/); keeping only under first name.
    netselect: 321 (24 active) nameserver request(s)...       
    Duplicate address 24.215.0.24 (http://debian.mirror.rafal.ca/debian/, http://24.215.0.24/debian/); keeping only under first name.
    netselect: 313 (23 active) nameserver request(s)...       
    Duplicate address 132.246.2.23 (http://132.246.2.23/debian/, http://ftp3.nrc.ca/debian/); keeping only under first name.
    ...........
    ...........
    netselect: 12 (12 active) nameserver request(s)...       
    Duplicate address 140.110.123.9 (http://ftp.ncnu.edu.tw/debian/, http://ftp.twaren.net/debian/); keeping only under first name.
    netselect: 4 (4 active) nameserver request(s)...         
    Duplicate address 199.6.12.70 (http://199.6.12.70/debian/, http://mirror.mycre.ws/debian/); keeping only under first name.
    Running netselect to choose 1 out of 349 addresses.     
    ....................................................................................................................................................................................................................................................................................
    The fastest server seems to be:
            http://ftp.hk.debian.org/debian/
    
    Writing sources.list-2.
    Done.
    

    ternyata didapatkan repository yang berbeda dengan yang pertama. Hmmm..tapi kok masih "daerah sana" ya ??? :).. mungkin infrastruktur teknologi informasi di daerah "sana" memang lebih baik dibanding kawasan Asia lainnya. (hanya pikiran penulis saja πŸ™‚ ).

    saatnya kita cek lagi dengan update

    $ sudo apt-get update
    Get:1 http://ftp.hk.debian.org stable Release.gpg [1,672 B]                                                 
    Get:2 http://packages.dotdeb.org stable Release.gpg [836 B]                        
    Ign http://packages.dotdeb.org/ stable/all Translation-en                       
    Ign http://ftp.hk.debian.org/debian/ stable/contrib Translation-en
    Get:3 http://security.debian.org stable/updates Release.gpg [836 B]-en
    .........................
    Ign http://ftp.hk.debian.org/debian/ stable/main Translation-en_US
    Ign http://security.debian.org/ stable/updates/non-free Translation-en_US
    Get:6 http://security.debian.org stable/updates Release [38.4 kB]
    Ign http://ftp.hk.debian.org/debian/ stable/non-free Translation-en
    Ign http://ftp.hk.debian.org/debian/ stable/non-free Translation-en_US                                                                                                
    Get:7 http://ftp.hk.debian.org stable Release [87.3 kB]                                                                                                               
    Get:8 http://security.debian.org stable/updates/main amd64 Packages [165 kB]                                                                                          
    Get:9 http://ftp.hk.debian.org stable/main amd64 Packages [6,540 kB]                                                                                                  
    Get:10 http://security.debian.org stable/updates/contrib amd64 Packages [678 B]                                                                                       
    Get:11 http://security.debian.org stable/updates/non-free amd64 Packages [14 B]                                                                                       
    Get:12 http://ftp.hk.debian.org stable/contrib amd64 Packages [53.0 kB]                                                                                               
    Get:13 http://ftp.hk.debian.org stable/non-free amd64 Packages [102 kB]                                                                                               
    Fetched 7,009 kB in 2min 46s (42.0 kB/s)                                                                                                                              
    Reading package lists... Done
    

    Hmmm… dari dua kali menjalankan netselect-apt, ternyata merekomendasikan repository di Taiwan dan Hongkong, yang masih berada dalam satu kawasan πŸ™‚

    yang menjadi keheranan saya pribadi, kemana mirror di Indonesia ?? :), kenapa dari dua kali netselect-apt belum direkomendasikan ?. Dari daftar mirror yang terdaftar secara resmi di Debian Mirror dari Indonesia (http://www.debian.org/mirror/mirrors_full#ID), ada beberapa mirror, yakni :

    Site: kebo.vlsm.org, surabaya.vlsm.org, katmai.its.ac.id
    Site: kambing.ui.ac.id
    Site: debian.indika.net.id
    Site: mirror.unej.ac.id

    Mungkin, kita masih perlu memperbaiki infrastruktur internet yang ada…. 😦

    Comments
    4 Responses to “Memilih mirror “tercepat” di Debian :)”
    1. Heru Sularto says:

      maaf gan, setahu ane, yg paling atas itu mirrorny UI, bukan UGM? trus utk mirrornya its itu mirror.its.ac.id bukan katmai.its.ac.id

      • blackshirt says:

        setahu ane, yg paling atas itu mirrorny UI, bukan UGM

        terima kasih kang koreksinya. πŸ™‚ ternyata ane yang salah “paste”, akan segera diperbaiki

        trus utk mirrornya its itu mirror.its.ac.id bukan katmai.its.ac.i

        terus yang ini, ane cuma merujuk ke link yang ada, coba di lihat saja

    2. Deandre says:

      I have read so many content on the topic of the blogger
      lovers but this paragraph is truly a fastidious post, keep
      it up.

    3. pai says:

      Saya di Medan. Yang tercepat dari Singapura (http://mirror.0x.sg), berikutnya Indonesia (http://kartolo.sby.datautama.net.id). Thanks for this tips :-).

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    %d bloggers like this: