Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HowTo] Velocizzare download in emerge:Axel e mirrorselect
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Sat May 15, 2004 9:00 am    Post subject: [HowTo] Velocizzare download in emerge:Axel e mirrorselect Reply with quote

EDIT: (15-05-2004) aggiunto tip per mirrorselect, ripulito un po'.
EDIT: (23-05-2004) aggiunto esempio di file di configurazione per axel

- Probabilmente sarete insoddisfatti di wget per scaricare i pacchetti durante i merge.
- Eventualmente molti di voi non hanno la fibra di fastweb e vogliono ottimizzare al meglio la banda che usano.
- Sicuramente i piu' smaliziati di voi avranno capito che, anche se usano prozilla per il download, questo apre diverse connessioni si, ma alla stessa fonte: cosa abbastanza inutile, visto che in questo modo, se un sito va offline, non funziona piu' nulla.
- Per di piu', tanti di noi saranno stanchi di aver talvolta iniziato dei lunghi merging di un treno di pacchetti, per vederselo interrompere da una fonte non disponibile!
- A volte capita che usando ~x86, in alcuni mirror non siano ancora disponibili i tarball dei sorgenti dei pacchetti. Questo sistema risolve anche questa eventualita' :)

Ecco che allora entra in gioco axel: e' un download manager come gli altri, ma e' leggero e pare nato apposta per portage.
Come funziona: una volta che voi iniziate il download, axel cerca altri mirror, anche fuori da quelli specificati in emerge, per il dato file, e ne spezza lo scaricamento.
Questo meccanismo e' efficientissimo nei merge di pacchetti grossi (come kernel, openoffice, xfree, gcc), un po' meno per pacchetti molto piccoli.

Personalmente lo uso non tanto per portare all'estremo l'uso della banda, quanto per la ridondanza (se una fonte non funziona, ne cerca un'altra)

Usare axel al posto di wget per scaricare i files
Code:
emerge axel
nano /etc/make.conf


modificate o aggiungete queste due righe:
Code:
FETCHCOMMAND="/usr/bin/axel -a -S10 \${URI} -o \${DISTDIR}"
RESUMECOMMAND="/usr/bin/axel -a -S10 \${URI} -o \${DISTDIR}"


Quello che segue e' un file di configurazione, /etc/axelrc, necessario per evitare che alcuni download si inchiodino quando le fonti non sono disponibili o sono lente.
Quello che includo vale per una connessione di 640k/1mbit circa, ma adattatelo alle vostre esigenze se credete (facendo delle prove); per i significati delle variabili, vedete il file di configurazione originale.
Code:
reconnect_delay = 5
# max_speed = 0
num_connections = 5
connection_timeout = 5
# http_proxy =
# no_proxy =
# strip_cgi_parameters = 1
# default_filename = default
# save_state_interval = 10
# verbose = 1
search_timeout = 5
search_threads = 5
search_amount = 10
search_top = 4



Esempio di un merge usando axel:
Code:
# emerge ngrep
Calculating dependencies ...done!
>>> emerge (1 of 1) net-analyzer/ngrep-1.41 to /
>>> Downloading http://easynews.dl.sourceforge.net/sourceforge/ngrep/ngrep-1.41.tar.bz2
Initializing download: http://easynews.dl.sourceforge.net/sourceforge/ngrep/ngrep-1.41.tar.bz2

Doing search...
Testing speeds, this can take a while...
10 usable servers found, will use these URLs:
URL                                                                    Speed
ftp://ftp.uni-kl.de/pub/linux/gentoo/distfiles/ngrep-1.41.tar.bz2        854
http://easynews.dl.sourceforge.net/sourceforge/ngrep/ngrep-1.41.tar.bz   858
ftp://ftp.man.szczecin.pl/disks/disk0/gentoo/distfiles/ngrep-1.41.tar.   928
ftp://ftp.man.szczecin.pl/disks/disk0/NetBSD/packages/distfiles/ngrep-   934
ftp://ftp.man.szczecin.pl/disks/disk0/security/packet-capture/ngrep/ng   957
ftp://ftp.freenet.de/pub/.disk0/ftp.snt.utwente.nl/pub/os/linux/gentoo  1018
ftp://ftp.chg.ru/.8/sourceforge/n/ng/ngrep/ngrep-1.41.tar.bz2           1505
ftp://ftp.chg.ru/.2/Linux/gentoo/distfiles/ngrep-1.41.tar.bz2           1662
ftp://ftp.tpnet.pl/d1/ftp.pld-linux.org/distfiles/by-md5/b/9/b9bf857c6  2319
ftp://ftp.gw.com/pub/distfiles/ngrep-1.41.tar.bz2                       7777
 
File size: 520209 bytes
Opening output file /home/portage/distfiles/ngrep-1.41.tar.bz2
Starting download
 
Connection 0 finished                                                          ]
Connection 2 finished                                                          ]
Connection 3 finished                                                          ]
[100%] [..................................................] [  81.5KB/s] [00:00]
 
Downloaded 508.0 kilobytes in 6 seconds. (81.49 KB/s)
>>> md5 src_uri ;-) ngrep-1.41.tar.bz2
>>> Unpacking source...
[...]

Scegliere i mirror piu' veloci con mirrorselect
Cosa fare se le fonti per un dato file non sono poi tante o non sono disponibili?
Una opzione e' specificare dei mirror quanto piu' possibile vicini e performanti specificatamente per la connessione che usate.
Per questo usiamo mirrorselect, un programma che fa il test delle connessioni e calcola la velocita' effettiva, scegliendo il miglior mirror.

Consiglio caldamente di interrompere eventuali trasferimenti di file durante il test, altrimenti non dara' un risultato preciso.

Code:
emerge mirrorselect
mirrorselect -a -D -s3 -b10

.. e il gioco e' fatto. vi troverete una riga in /etc/make.conf che sara' pressapoco cosi':
Code:
GENTOO_MIRRORS="http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/ http://darkstar.ist.utl.pt/gentoo/ http://ftp.easynet.nl/mirror/gentoo/"


Questo ovviamente, funziona anche se usate il solito wget al posto di axel.

Usare il nostro server italiano:
buona norma sarebbe anche usareil nostro server rsync (forniti dal buon lcars):
Code:
SYNC="rsync://rsync1.it.gentoo.org/gentoo-portage"

ed eventualmente, se ancora non lo avete fatto, il mirror di portage:
Code:
GENTOO_MIRRORS="http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/  ...(quello che avevate prima)..."


ricordate che la gentoo-etiquette vuole che sia buona norma syncare non piu di una volta al giorno! (Di piu', raramente serve)

ora potete emergere quello che volete. buon lavoro :)
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)


Last edited by FonderiaDigitale on Sun May 23, 2004 7:17 am; edited 3 times in total
Back to top
View user's profile Send private message
HunterD
Apprentice
Apprentice


Joined: 10 Mar 2004
Posts: 165

PostPosted: Sat May 15, 2004 9:20 am    Post subject: Reply with quote

Grazie ! Ottimo tip ! Hai risolto un problema che stavo per presentare ! Il fatto cioè che per emerge corposi ( vedi kde ) o numerosi in termini di pacchetti talvolta mi beccava dei mirror down e per forza di cose dovevo interrompere a manina e ridare l'emerge !!
Back to top
View user's profile Send private message
stuart
Guru
Guru


Joined: 27 Apr 2003
Posts: 552

PostPosted: Sat May 15, 2004 9:34 am    Post subject: Reply with quote

effettivamente risolve un bel pò di problemi in certi emerge di pacchetti non proprio diffusissimi
grazie
_________________
Pochissime persone crescono. La maggior parte della gente invecchia.
Back to top
View user's profile Send private message
micron
Guru
Guru


Joined: 23 Jul 2003
Posts: 411
Location: Bergamo, Italy

PostPosted: Sat May 15, 2004 11:57 am    Post subject: Reply with quote

Ottimo tip, complimenti! :wink:
Risolve un po' di situazioni fastidiose!
_________________
~ "Progress is merely a realisation of utopias" ~
Back to top
View user's profile Send private message
Josuke
Veteran
Veteran


Joined: 07 May 2003
Posts: 1175
Location: Italy - Bolzano

PostPosted: Sat May 15, 2004 1:11 pm    Post subject: Reply with quote

ma c'è molta differenza con prozilla?
_________________
fletto i muscoli...e sono nel vuoto
Back to top
View user's profile Send private message
HunterD
Apprentice
Apprentice


Joined: 10 Mar 2004
Posts: 165

PostPosted: Sat May 15, 2004 1:19 pm    Post subject: Reply with quote

Quote:

Sicuramente i piu' smaliziati di voi avranno capito che, anche se usano prozilla per il download, questo apre diverse connessioni si, ma alla stessa fonte: cosa abbastanza inutile, visto che in questo modo, se un sito va offline, non funziona piu' nulla.


Mi sembra una differenza non da poco...
Back to top
View user's profile Send private message
Benve
l33t
l33t


Joined: 13 Mar 2003
Posts: 897
Location: Italy Romagna

PostPosted: Sat May 15, 2004 2:23 pm    Post subject: Reply with quote

Mi pareva dovesse esistere un programma che facesse cio!
Grazie mille
Back to top
View user's profile Send private message
Josuke
Veteran
Veteran


Joined: 07 May 2003
Posts: 1175
Location: Italy - Bolzano

PostPosted: Sat May 15, 2004 2:25 pm    Post subject: Reply with quote

si sono un monega non avevo letto bene sorry :oops:
_________________
fletto i muscoli...e sono nel vuoto
Back to top
View user's profile Send private message
zUgLiO
l33t
l33t


Joined: 12 Aug 2003
Posts: 754
Location: Ferrara (Italy)

PostPosted: Sat May 15, 2004 2:38 pm    Post subject: Reply with quote

Grande,utilissimo :D

P.S.
Complimenti per il nuovo avatar,è bellissimo :o
_________________

voglio poi dire che il tempo mi avrà fatto abituare,

ma io non trovo nemmeno brutta la stiva buia di questa nave
Back to top
View user's profile Send private message
ema
Guru
Guru


Joined: 27 Aug 2003
Posts: 380

PostPosted: Sat May 15, 2004 3:28 pm    Post subject: Reply with quote

grande! finalmente un post chiarissimo su come usare axel in emerge!
ben fatto!
Back to top
View user's profile Send private message
f0llia
l33t
l33t


Joined: 22 Apr 2003
Posts: 873

PostPosted: Sat May 15, 2004 3:39 pm    Post subject: Reply with quote

Ottimo post, è utilissimo
Grazie :D
Back to top
View user's profile Send private message
MyZelF
Bodhisattva
Bodhisattva


Joined: 25 Feb 2003
Posts: 2010
Location: Venice, Italy

PostPosted: Sat May 15, 2004 4:59 pm    Post subject: Reply with quote

Tip AWARD! 8)
_________________
"Larry the Cow was a bit frustrated at the current state of Linux Distributions..."
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Sat May 15, 2004 7:46 pm    Post subject: Reply with quote

Grazie :)
per l'occasione, ho aggiunto due righe su come usare mirrorselect.
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Sun May 23, 2004 7:18 am    Post subject: Reply with quote

aggiornato di nuovo, con /etc/axelrc incluso.
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
fabel
n00b
n00b


Joined: 27 Jun 2004
Posts: 6

PostPosted: Sun Jun 27, 2004 2:34 pm    Post subject: Re: [HowTo] Velocizzare download in emerge:Axel e mirrorsele Reply with quote

Quote:
modificate o aggiungete queste due righe:
Code:
FETCHCOMMAND="/usr/bin/axel -a -S10 \${URI} -o \${DISTDIR}"
RESUMECOMMAND="/usr/bin/axel -a -S10 \${URI} -o \${DISTDIR}"




A me finche non ho modificato le 2 righe come segue:
(ignorate pure -v e -S4)

Code:

FETCHCOMMAND="/usr/bin/axel -v -a -S4 -o \${DISTDIR}/\${FILE} \${URI}"
RESUMECOMMAND="/usr/bin/axel -v -a -S4 -o \${DISTDIR}/\${FILE} \${URI}"


non ha funzionato. A voi funzionava comunque? magari ho capito male qualcosa.

ciao
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Sun Jun 27, 2004 10:55 pm    Post subject: Reply with quote

si, a me funziona comunque. hai fatto bene a indicarlo, in ogni caso :)
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
fabel
n00b
n00b


Joined: 27 Jun 2004
Posts: 6

PostPosted: Mon Jun 28, 2004 9:46 pm    Post subject: Reply with quote

c'è qualcosa che non mi funziona nella mia installazione, capita che il download si blocca dopo la ricerca, ad esempio:

Code:

Calculating system dependencies ...done!
>>> emerge (1 of 4) net-misc/iputils-021109-r3 to /
>>> Downloading ftp://gentoo.inode.at/source/distfiles/iputils-ss021109-try.tar.bz2
Initializing download: ftp://gentoo.inode.at/source/distfiles/iputils-ss021109-try.tar.bz2
Doing search...
Testing speeds, this can take a while...
4 usable servers found, will use these URLs:
URL                                                                    Speed
ftp://gentoo.inode.at/source/distfiles/iputils-ss021109-try.tar.bz2     1295
ftp://ftp.tpnet.pl/d2/ftp.slackware.com/slackware-current/source/n/tcp  1356
ftp://ftp.tpnet.pl/d2/ftp.slackware.com/slackware-9.1/source/n/tcpip/i  1895
ftp://ftp.tpnet.pl/d1/ftp.pld-linux.org/distfiles/by-md5/d/d/dd10ef3d7  3941


e rimane qui indefinitivamente :cry:

le entry in make.conf

Code:

FETCHCOMMAND="/usr/bin/axel -v -S4 -o \${DISTDIR}/\${FILE} \${URI}"
RESUMECOMMAND="/usr/bin/axel -v -S4 -o \${DISTDIR}/\${FILE} \${URI}"


e il file di configurazione riporta:

Code:

reconnect_delay = 15
connection_timeout = 25
search_timeout = 5
search_threads = 3
search_amount = 15
search_top = 4


vi viene in mente da cosa possa dipendere?
_________________
Don't throw anything out of the windows,
but throw Windows out of everything! (abel)
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Mon Jun 28, 2004 10:37 pm    Post subject: Reply with quote

prova a usare axel con quelle opzioni come se fosse wget, scaricando una iso (ad esempio).... funziona?
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
fabel
n00b
n00b


Joined: 27 Jun 2004
Posts: 6

PostPosted: Wed Jun 30, 2004 10:16 pm    Post subject: Reply with quote

non ho ancora isolato il problema, per esempio oggi ha funzionato, se ricapita che si blocchi indago meglio.

ciao
_________________
Don't throw anything out of the windows,
but throw Windows out of everything! (abel)
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Wed Jun 30, 2004 10:23 pm    Post subject: Reply with quote

credo dipenda piu che altro dalla tua rete.
prova ad abbassare il numero di thread e ricerche contemporannee e diminuire i timeout
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
Raffo
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1019
Location: Berlin

PostPosted: Thu Jul 01, 2004 10:42 am    Post subject: Reply with quote

ho provato a emergere vim e mi da questo errore:
Code:
Calculating dependencies ...done!
>>> emerge (1 of 3) dev-util/ctags-5.5-r1 to /
>>> Downloading ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/distfiles/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
>>> Downloading http://gentoo.tiscali.nl/gentoo/distfiles/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
>>> Downloading http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/distfiles/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
>>> Downloading http://heanet.dl.sourceforge.net/sourceforge/ctags/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
>>> Downloading http://aleron.dl.sourceforge.net/sourceforge/ctags/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
>>> Downloading http://keihanna.dl.sourceforge.net/sourceforge/ctags/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
>>> Downloading http://switch.dl.sourceforge.net/sourceforge/ctags/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
>>> Downloading http://umn.dl.sourceforge.net/sourceforge/ctags/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
>>> Downloading http://cesnet.dl.sourceforge.net/sourceforge/ctags/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
>>> Downloading http://unc.dl.sourceforge.net/sourceforge/ctags/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
>>> Downloading http://easynews.dl.sourceforge.net/sourceforge/ctags/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
>>> Downloading http://belnet.dl.sourceforge.net/sourceforge/ctags/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
>>> Downloading http://osdn.dl.sourceforge.net/sourceforge/ctags/ctags-5.5.tar.gz
Error in /etc/axelrc line 10.
!!! Couldn't download ctags-5.5.tar.gz. Aborting.

come lo risolvo?
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Thu Jul 01, 2004 12:10 pm    Post subject: Reply with quote

Raffo wrote:
Error in /etc/axelrc line 10.


Direi che hai cpiato male l'axelrc suggerito da FonderiaDigitale.

Edita il file e correggi la linea 10!
_________________
Ciao da me!
Back to top
View user's profile Send private message
Raffo
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1019
Location: Berlin

PostPosted: Thu Jul 01, 2004 12:21 pm    Post subject: Reply with quote

randomaze wrote:
Raffo wrote:
Error in /etc/axelrc line 10.


Direi che hai cpiato male l'axelrc suggerito da FonderiaDigitale.

Edita il file e correggi la linea 10!

si ma la linea 10 è questa "reconnect_delay = 5 "....nn capisco cosa ci possa essere di sbagliato.... ho provato anche a cambiare il numero, a mettere 15 o 20 al posto di 5 ma mi da sempre errore....
Back to top
View user's profile Send private message
Raffo
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1019
Location: Berlin

PostPosted: Thu Jul 01, 2004 6:26 pm    Post subject: Reply with quote

ho provato a commentare la linea 10 e così mi da errore alla linea 22. poi ho commentato la linea 22 e mi da errore alla linea 27. praticamente mi da come errate tutte le linee che nn sono commentate...qualcuno ha qualche idea?
Back to top
View user's profile Send private message
raino
n00b
n00b


Joined: 08 Nov 2002
Posts: 14
Location: Italy

PostPosted: Thu Jul 01, 2004 6:48 pm    Post subject: Reply with quote

Non ci devono essere spazi all'inizio della riga :)

edit: ora che guardo bene alla fine del comando prima delle " c'e uno spazio...mi sa che è quello :)

Almeno a me dava lo stesso errore, ho tolto lo spazio che c'era all'inizio del file di conf e ora è tutto ok...

ciao
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum