Upload
paulo-trezentos
View
825
Download
1
Tags:
Embed Size (px)
DESCRIPTION
As a Linux distribution we face a huge number of reports of users unable to install packages due to APT limited solving capabilityIn the scope of a EU research project (MANCOOSI) we had enhanced the solving capabilities of APT using pseudo-Boolean optimization. In this talk we propose to share the results and discuss with the community how this work can help other distributions.
Citation preview
IntroductionAPT-PBO
Experimental ResultsConclusions
APT-PBO: improving the SoftwareDependency Problem using Pseudo-Boolean
OptimizationFOSDEM 2011 - Brussels
Paulo Trezentos
February 6, 2011
Trezentos APT-PBO 1/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Agenda
1 IntroductionProblem
2 APT-PBOArchitectureAlgorithm
3 Experimental ResultsUnmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
4 Conclusions
Trezentos APT-PBO 2/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Problem
Agenda
1 IntroductionProblem
2 APT-PBOArchitectureAlgorithm
3 Experimental ResultsUnmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
4 Conclusions
Trezentos APT-PBO 3/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Problem
Installing Linux packages (software components) is...
XKCD Webcomics, http://xkcd.com/754/
Trezentos APT-PBO 4/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Problem
Introduction to the problem
Relevance:Installation process is critical for Operating Systemsdissemination
Problem:It is often reported that problems of broken dependenciesbetween software packages in Linux
Solution:Use SAT to solve dependencies or, better, use PBO tochoose between solutions
Related work:EDOS, MANCOOSI, Opium / Linspire, SuSE Libzypp,Eclipse P2 / SAT4J,...
Trezentos APT-PBO 5/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Problem
Introduction to the problem
Relevance:Installation process is critical for Operating Systemsdissemination
Problem:It is often reported that problems of broken dependenciesbetween software packages in Linux
Solution:Use SAT to solve dependencies or, better, use PBO tochoose between solutions
Related work:EDOS, MANCOOSI, Opium / Linspire, SuSE Libzypp,Eclipse P2 / SAT4J,...
Trezentos APT-PBO 5/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Problem
Introduction to the problem
Relevance:Installation process is critical for Operating Systemsdissemination
Problem:It is often reported that problems of broken dependenciesbetween software packages in Linux
Solution:Use SAT to solve dependencies or, better, use PBO tochoose between solutions
Related work:EDOS, MANCOOSI, Opium / Linspire, SuSE Libzypp,Eclipse P2 / SAT4J,...
Trezentos APT-PBO 5/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Problem
Introduction to the problem
Relevance:Installation process is critical for Operating Systemsdissemination
Problem:It is often reported that problems of broken dependenciesbetween software packages in Linux
Solution:Use SAT to solve dependencies or, better, use PBO tochoose between solutions
Related work:EDOS, MANCOOSI, Opium / Linspire, SuSE Libzypp,Eclipse P2 / SAT4J,...
Trezentos APT-PBO 5/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Problem
Dependencies solving
door
engine
2
3tyre
window
2
2
1conflicts
glass
glass
wheelcar 2
2
1
turbo 1
1
2
2
0
11
Install car
Trezentos APT-PBO 6/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Problem
Dependencies solving
door
engine
2
tyre
window
2
1conflicts
glass
glass
car 2
1
turbo 1
2
0
11
2
23
wheel
1
2
Install carNeed to install the dependencies / avoid conflictsNP-problem
Trezentos APT-PBO 6/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
ArchitectureAlgorithm
Agenda
1 IntroductionProblem
2 APT-PBOArchitectureAlgorithm
3 Experimental ResultsUnmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
4 Conclusions
Trezentos APT-PBO 7/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
ArchitectureAlgorithm
APT-PBO Architecture
apt-pbo install car
[installed packages]
pboinstall: encoding of the problem
PBO solver: external solverParsing / processing: analyse the solution and iterateapt-get install: install packages
Trezentos APT-PBO 8/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
ArchitectureAlgorithm
APT-PBO Architecture
apt-pbo install car
[installed packages]
pboinstall: encoding of the problemPBO solver: external solver
Parsing / processing: analyse the solution and iterateapt-get install: install packages
Trezentos APT-PBO 8/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
ArchitectureAlgorithm
APT-PBO Architecture
apt-pbo install car
[installed packages]
pboinstall: encoding of the problemPBO solver: external solverParsing / processing: analyse the solution and iterate
apt-get install: install packages
Trezentos APT-PBO 8/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
ArchitectureAlgorithm
APT-PBO Architecture
apt-pbo install car
[installed packages]
pboinstall: encoding of the problemPBO solver: external solverParsing / processing: analyse the solution and iterateapt-get install: install packages
Trezentos APT-PBO 8/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
ArchitectureAlgorithm
APT-PBO Algorithm
Require: Package to install p1, Pol1: repeat2: (f , c)← call_pboinstall(p1, Pc , Pol , R, PI)3: S ← call_solver(f , c)4: Pc ← 05: for all pi ∈ S such that pi = 0 do6: Pc ← check_rdeps(pi)7: end for8: for all pj ∈ S such that pj = 1 do9: Pc ← check_rconfs(pj)
10: end for11: until Pc = 012: return f , c
Trezentos APT-PBO 9/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
ArchitectureAlgorithm
MulticriteriaIf we try to satisfy different criteria, we have a MCDM(Multicriteria Decision Making problem)
APT-PBO integrates different objective function as amultiobjective problem (MOP) and transforming into asingle objective problem through weighted sumscalarization:
min3∑
k=1
Wk · fk (P)
and therefore:
min (Wr · f1(P) + Wp · f2(P) + Wv · f3(P))
Trezentos APT-PBO 10/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
ArchitectureAlgorithm
MulticriteriaIf we try to satisfy different criteria, we have a MCDM(Multicriteria Decision Making problem)APT-PBO integrates different objective function as amultiobjective problem (MOP) and transforming into asingle objective problem through weighted sumscalarization:
min3∑
k=1
Wk · fk (P)
and therefore:
min (Wr · f1(P) + Wp · f2(P) + Wv · f3(P))
Trezentos APT-PBO 10/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Unmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
Agenda
1 IntroductionProblem
2 APT-PBOArchitectureAlgorithm
3 Experimental ResultsUnmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
4 Conclusions
Trezentos APT-PBO 11/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Unmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
Unmet dependencies analysisksplash
kdelibs4c2a libc6 libgcc1 libstdc++6 kdebase-data libx11-6 libxext6
3.5.9.dfsg.1-6 4.2.2-1
Meta-installer Possible No WrongSolutions Solutions Solutions
Apt-get 591 123 0Aptitude 713 0 1Smart 714 0 0Apt-pbo 714 0 0
Trezentos APT-PBO 12/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Unmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
Meta-installers performance
00-00
00-02
00-04
00-06
00-08
00-10
00-12
00-14
0 20 40 60 80 100 120 140
Exec
uti
on t
ime
(sec
onds)
Problem size (# installed packages)
apt-getaptitude
smartapt-pbo
Meta-installer Average Time Standard DeviationApt-get 00:00.21 00:00.17Aptitude 00:00.62 00:00.15Smart 00:02.63 00:00.25Apt-pbo 00:03.77 00:01.91
Trezentos APT-PBO 13/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Unmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
Solutions assessment
Each package transaction can include installation, update,removal or downgradeIn 1.000 package transactions, how each meta-installerbehaves?
Tool Installed Updated Removed Down-graded
apt-get 7,766 17 12 0aptitude 8,423 18 161 464smart 7,786 92 124 479PBO freshness 6,808 20,449 25 567PBO removal 7,767 11 162 443PBO number 7,729 13 102 500
Trezentos APT-PBO 14/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Unmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
Solutions assessment
Apt-get
Aptitude
Smart
PBO
-Freshness
PBO
-Rem
oval
PBO
-Num
ber
% o
f to
tal
InstallUpdatesRemoveDowngrade
Trezentos APT-PBO 15/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Unmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
Multi-criteria
In APT-PBO, varying the weights, we can have differentsolutions.
For example, varying freshness weight we can obtaindifferent solutions for package at-spi:
Trezentos APT-PBO 16/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Unmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
Multi-criteria
In APT-PBO, varying the weights, we can have differentsolutions.For example, varying freshness weight we can obtaindifferent solutions for package at-spi:
Aggressive ConservativeInstall 9 37Updates 35 35Remove 1 0Downgrade 7 10Time 00:19.45 00:17.37
Trezentos APT-PBO 16/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Unmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
ap-spi - conservative freshness
To avoid the removal of “file-roller” we perform theinstallation of 28 extra-packages
libgnomevfs2-0
2.22
libhal1
0.5
libgconf2-4
2.26 -> 2.22
libbonobo2-0
2.22
conflicts < 2.24 at-spi
1.22
libnautilus-extension1
2.26 ->2.20
file-roller
2.26 ->2.22
breaks < 2.24
...+24
..+2breaks < 2.24
Trezentos APT-PBO 17/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Unmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
ap-spi - agressive freshness
With “just” one removal of “file-roller” with avoid theinstallation of 28 packages and the downgrade of 3.
libgconf2-4
2.26 -> 2.22
libbonobo2-0
2.22
conflicts < 2.24 at-spi
1.22
file-roller
2.26 ->2.22
libnautilus-extension1
2.26
breaks < 2.24
Trezentos APT-PBO 18/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Agenda
1 IntroductionProblem
2 APT-PBOArchitectureAlgorithm
3 Experimental ResultsUnmet dependencies analysisMeta-installers performanceSolutions assessmentMulticriteria
4 Conclusions
Trezentos APT-PBO 19/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Conclusions
APT-PBO is a freely available tool (GPL) that can betested, available for Debian, Mandriva and Caixa Magica
PBO encoding proved to be suitable for the problem andprovides extra-flexibility compared with SAT toolsMulti-criteria is a desirable and achievable optionPerformance is an issue for large repositories and somecombination of weights.
Trezentos APT-PBO 20/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Conclusions
APT-PBO is a freely available tool (GPL) that can betested, available for Debian, Mandriva and Caixa MagicaPBO encoding proved to be suitable for the problem andprovides extra-flexibility compared with SAT tools
Multi-criteria is a desirable and achievable optionPerformance is an issue for large repositories and somecombination of weights.
Trezentos APT-PBO 20/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Conclusions
APT-PBO is a freely available tool (GPL) that can betested, available for Debian, Mandriva and Caixa MagicaPBO encoding proved to be suitable for the problem andprovides extra-flexibility compared with SAT toolsMulti-criteria is a desirable and achievable option
Performance is an issue for large repositories and somecombination of weights.
Trezentos APT-PBO 20/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Conclusions
APT-PBO is a freely available tool (GPL) that can betested, available for Debian, Mandriva and Caixa MagicaPBO encoding proved to be suitable for the problem andprovides extra-flexibility compared with SAT toolsMulti-criteria is a desirable and achievable optionPerformance is an issue for large repositories and somecombination of weights.
Trezentos APT-PBO 20/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Future work
Better tuning of PBO encoding and work with PBO solverresearchers to improve performance issues
Support new features like using APT-PBO for removals,etallEnhance interactive mode
Trezentos APT-PBO 21/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Future work
Better tuning of PBO encoding and work with PBO solverresearchers to improve performance issuesSupport new features like using APT-PBO for removals,etall
Enhance interactive mode
Trezentos APT-PBO 21/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Future work
Better tuning of PBO encoding and work with PBO solverresearchers to improve performance issuesSupport new features like using APT-PBO for removals,etallEnhance interactive mode
Trezentos APT-PBO 21/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
More information
Paulo Trezentos, Ines Lynce, and Arlindo L. Oliveira.Apt-pbo: solving the software dependency problem usingpseudo-boolean optimization. In ASE 10: Proceedings ofthe IEEE/ACM international conference on Automatedsoftware engineering, pages 427-436, New York, NY, USA,2010. ACM
http://aptpbo.caixamagica.pt
Trezentos APT-PBO 22/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
More information
Paulo Trezentos, Ines Lynce, and Arlindo L. Oliveira.Apt-pbo: solving the software dependency problem usingpseudo-boolean optimization. In ASE 10: Proceedings ofthe IEEE/ACM international conference on Automatedsoftware engineering, pages 427-436, New York, NY, USA,2010. ACMhttp://aptpbo.caixamagica.pt
Trezentos APT-PBO 22/ 23
IntroductionAPT-PBO
Experimental ResultsConclusions
Thank you.
Questions.
Trezentos APT-PBO 23/ 23