You are not logged in.

#1 2008-07-04 17:06:54

faelar
Member
From: Amiens (FR)
Registered: 2007-12-18
Posts: 232
Website

Install packages while others are downloading

This post is not a feature request for pacman, just a question I'm asking to myself.

When you want to update your system, the first step is the download of all the packages and dependencies. Then, when all is download, the installation step starts.

Couldn't the two step be mixed to improve the speed of the package manager ?
here an exemple of what I have in mind :

- You want to install 3 packages named 1, 2 and 3
- Package 1 needs dependencies a,b and c
- Package 2 needs a and d
- Package 3 needs e

First, it will download 1, a, b and c.
The installation will only begin when c download end, to prevent a broken installation of 1 (no deps missing).
During the installation, 2 and d are downloaded.
Same with 3 and e etc...

I didn't have see this behavior in any Package Manager, so I would like to know why...
Is this technically too difficult ?
Maybe it slows the process instead of increasing the speed...
Anyway, let me know what you think of this idea.

Offline

#2 2008-07-04 17:40:11

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: Install packages while others are downloading

faelar wrote:

I didn't have see this behavior in any Package Manager, so I would like to know why...
Is this technically too difficult ?
Maybe it slows the process instead of increasing the speed...
Anyway, let me know what you think of this idea.

It just doesn't make sense to get this complicated. You are now talking about introducing threads to a package manager, which is a whole new set of issues to deal with. The tradeoff for the small bit of time saved just isn't worth it, and the possibility of problems occurring now increases 1000%. Whenever something like this comes up, I think it is important to consider all the possible failure routes rather than the 1 success route.

Offline

#3 2008-07-04 18:55:18

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: Install packages while others are downloading

The bottleneck is downloading the packages anyway. Installation time, on my machine, usually takes something around 1/4 or 1/5 the download time. Unless I'm Syu'ing for the first time in at least a week or two, installation itself never takes more than 30 seconds. If you want to speed up the sync process, threading downloads would make more sense. And even then, given how the mirrors seem to always be fast, it probably wouldn't help much.

Offline

#4 2008-07-04 19:17:43

meandean
Member
Registered: 2008-06-24
Posts: 67

Re: Install packages while others are downloading

interesting idea IMO but (much like toofishes thoughts) the (often unforeseen) issues that are created often override any advantage...

Sure it may be faster, but if it pegs my cpu trying to do all this and eats up tons of memory and makes my system unusable while I am updating then it is not better overall and overall is where it counts IMO.

But it is a interesting idea...and probably would be a good experiment if nothing else


Even a chicken can install Debian, when you put enough grain on the enter key.

Offline

#5 2008-07-04 19:29:06

jdhore
Member
From: NYC
Registered: 2007-08-01
Posts: 156

Re: Install packages while others are downloading

meandean wrote:

interesting idea IMO but (much like toofishes thoughts) the (often unforeseen) issues that are created often override any advantage...

Sure it may be faster, but if it pegs my cpu trying to do all this and eats up tons of memory and makes my system unusable while I am updating then it is not better overall and overall is where it counts IMO.

But it is a interesting idea...and probably would be a good experiment if nothing else

Also, the packages download in the order of repos in your pacman.conf, what if you're installing something from Testing that depends on something in Extra? That will screw things up a bit. Also, what happens if your internet goes out for a sec (mine occasionally does) and pacman hiccups...Now, no big deal, with 2 actions going on at once, might not end so well.

IMO, it's better the way it currently is, i think.

Offline

#6 2008-07-05 10:43:44

faelar
Member
From: Amiens (FR)
Registered: 2007-12-18
Posts: 232
Website

Re: Install packages while others are downloading

Unless I'm Syu'ing for the first time in at least a week or two

the packages download in the order of repos in your pacman.conf

I can't blame archers for thinking in the pacman way wink
Of course, if you update your system daily, you probably have a few packages to download/install. But now see it in the perspective of a dist-upgrade in a distribution like ubuntu.

if it pegs my cpu trying to do all this and eats up tons of memory and makes my system unusable while I am updating then it is not better overall and overall is where it counts IMO.

I currently have a lot of CPU time and memory to waste, but it could be an issue for older computer yes.

I think it is important to consider all the possible failure routes rather than the 1 success route.

Thank you, I'll keep this in mind while programming.

Offline

Board footer

Powered by FluxBB