Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Some portage timings
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Jan 12, 2020 5:44 pm    Post subject: Some portage timings Reply with quote

Code:
Trantor ~ # time emerge -puvND @world

These are the packages that would be merged, in order:

Calculating dependencies... done!

Total: 0 packages, Size of downloads: 0 KiB

real   1m11.566s
user   1m11.198s
sys   0m0.317s
Trantor ~ # time emerge -puvND @world --backtrack=0

These are the packages that would be merged, in order:

Calculating dependencies... done!

Total: 0 packages, Size of downloads: 0 KiB

real   0m33.134s
user   0m32.776s
sys   0m0.319s

Dependency resolution is often said to be NP-hard. If so, breaking it into two smaller sets should reduce that total non-polynomial time. But it doesn't.
Code:
Trantor ~ # time emerge -puvND @system

These are the packages that would be merged, in order:

Calculating dependencies... done!

Total: 0 packages, Size of downloads: 0 KiB

real   0m34.998s
user   0m34.744s
sys   0m0.215s
Trantor ~ # time emerge -puvND @selected

These are the packages that would be merged, in order:

Calculating dependencies... done!

Total: 0 packages, Size of downloads: 0 KiB

real   1m11.315s
user   1m10.897s
sys   0m0.365s


This was run on a small system with a slow processor (FM2+ APU)
Code:
Packages installed:   751
Packages in world:    128
Packages in system:   43
Required packages:    748
Number to remove:     3
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Jan 12, 2020 6:17 pm    Post subject: Reply with quote

Tony0945,

You cannot break dependency resolution down into subsets, so it won't scale like that.
You would need to know in advance a list of packages to exclude from each subset. To get that exclusion list you need to run dependency resolution on the entire tree.
_________________
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
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Jan 12, 2020 7:03 pm    Post subject: Reply with quote

Isn't selected just world minus system?
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Sun Jan 12, 2020 7:05 pm    Post subject: Reply with quote

The --backtrack=0 looks promising for simple updates. Probably fails when major changes like gtk+, qt, python, perl are made. But for just occasional userland package updates it's probably good.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Jan 12, 2020 7:12 pm    Post subject: Reply with quote

Tony0945,

It still has to calculate the entire dependency tree.
e.g. gcc is in @system.
A package can depend on >=sys-devel/gcc-9.2.0 or any other system set package, a @system package with a particular USE flag on/off.

Try
Code:
emerge @system -ep
and again with your world file and USE settings moved out of the way.
You get quite different results.
_________________
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 Gentoo Chat 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