Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to download with more than one thread / emerge - ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
SarahS93
Guru
Guru


Joined: 21 Nov 2013
Posts: 543

PostPosted: Mon Feb 10, 2020 12:47 am    Post subject: how to download with more than one thread / emerge - ? Reply with quote

how to download wirth more than one thread with emerge?
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24077
Location: here

PostPosted: Mon Feb 10, 2020 7:36 am    Post subject: Re: how to download with more than one thread / emerge - ? Reply with quote

SarahS93 wrote:
how to download wirth more than one thread with emerge?

Can you elaborate on that? Usually parallel-fetch feature is enable by default and portage continue to download packages.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45451
Location: 56N 3W

PostPosted: Mon Feb 10, 2020 11:00 am    Post subject: Reply with quote

fedeliallalinea,

Files are fetched sequentially.
parallel-fetch fetches in parallel with building. The old behaviour was fetch files to build a package. Build it. Rinse and repeat.

I suspect that SarahS93 wants to open 100 download threads and fetch 100 files concurrently.
As you say, the question is not clear.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24077
Location: here

PostPosted: Mon Feb 10, 2020 11:12 am    Post subject: Reply with quote

NeddySeagoon wrote:
I suspect that SarahS93 wants to open 100 download threads and fetch 100 files concurrently.

I think you right, but in that case there is no clean solution.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
SarahS93
Guru
Guru


Joined: 21 Nov 2013
Posts: 543

PostPosted: Mon Feb 10, 2020 12:15 pm    Post subject: Reply with quote

NeddySeagoon , that is it for what i am looking.
but 100 are to much, 3 or 5 download threads will be fine.
is there a way to do that so?!
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7416

PostPosted: Mon Feb 10, 2020 1:00 pm    Post subject: Reply with quote

SarahS93,
Code:
emerge -p (yourcommand ie: -uDN world) > /tmp/mydownloadlist
grep "\[" /tmp/mydownloadlist | grep -v " B " | grep -v " b " | awk -F ']' '{print $2}' | awk -F ' ' '{print $1}' | xargs -P (number of download) -I{} emerge -f ={}

you build a list of files to download, the -p is need to build the list and not emerge anything
then you ask emerge to download (-f is fetch only) the file given by xargs, and xargs will run this one by one if -P 1 or four by four with -P 4, which just mean xargs will run x (the -P value) emerge to fetch a package

that's if you want saturate your download bandwith for some reason
because "normally" just doing "emerge -f yourcommand" run in another session should do it one by one and should be enough to use a lot of bandwith (there's a little delay between each fetch only while emerge process each package)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45451
Location: 56N 3W

PostPosted: Mon Feb 10, 2020 2:05 pm    Post subject: Reply with quote

SarahS93,

As krinn says. Running multiple downloads at the same time is of little practical value.
Maybe if you want to use a high bandwidth connection to --fetchonly but in the normal case, the first build is held up waiiting for the first fetch but building takes longer that fetching, so by the time emerge is ready to process the next package, the sources are already available.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
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