Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Aptpbo fosdem

1,427 views

Published on

As a Linux distribution we face a huge number of reports of users unable to install packages due to APT limited solving capability

In 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.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Aptpbo fosdem

  1. Introduction APT-PBO Experimental Results Conclusions APT-PBO: improving the SoftwareDependency Problem using Pseudo-Boolean Optimization FOSDEM 2011 - Brussels Paulo Trezentos February 6, 2011 Trezentos APT-PBO 1/ 23
  2. Introduction APT-PBO Experimental Results ConclusionsAgenda 1 Introduction Problem 2 APT-PBO Architecture Algorithm 3 Experimental Results Unmet dependencies analysis Meta-installers performance Solutions assessment Multicriteria 4 Conclusions Trezentos APT-PBO 2/ 23
  3. Introduction APT-PBO Problem Experimental Results ConclusionsAgenda 1 Introduction Problem 2 APT-PBO Architecture Algorithm 3 Experimental Results Unmet dependencies analysis Meta-installers performance Solutions assessment Multicriteria 4 Conclusions Trezentos APT-PBO 3/ 23
  4. Introduction APT-PBO Problem Experimental Results ConclusionsInstalling Linux packages (software components) is... XKCD Webcomics, http://xkcd.com/754/ Trezentos APT-PBO 4/ 23
  5. Introduction APT-PBO Problem Experimental Results ConclusionsIntroduction to the problem Relevance: Installation process is critical for Operating Systems dissemination Trezentos APT-PBO 5/ 23
  6. Introduction APT-PBO Problem Experimental Results ConclusionsIntroduction to the problem Relevance: Installation process is critical for Operating Systems dissemination Problem: It is often reported that problems of broken dependencies between software packages in Linux Trezentos APT-PBO 5/ 23
  7. Introduction APT-PBO Problem Experimental Results ConclusionsIntroduction to the problem Relevance: Installation process is critical for Operating Systems dissemination Problem: It is often reported that problems of broken dependencies between software packages in Linux Solution: Use SAT to solve dependencies or, better, use PBO to choose between solutions Trezentos APT-PBO 5/ 23
  8. Introduction APT-PBO Problem Experimental Results ConclusionsIntroduction to the problem Relevance: Installation process is critical for Operating Systems dissemination Problem: It is often reported that problems of broken dependencies between software packages in Linux Solution: Use SAT to solve dependencies or, better, use PBO to choose between solutions Related work: EDOS, MANCOOSI, Opium / Linspire, SuSE Libzypp, Eclipse P2 / SAT4J,... Trezentos APT-PBO 5/ 23
  9. Introduction APT-PBO Problem Experimental Results ConclusionsDependencies solving turbo 1 1 engine 2 2 1 wheel tyre conflicts car 2 3 2 1 0 glass 1 window 1 2 door 2 glass 2 Install car Trezentos APT-PBO 6/ 23
  10. Introduction APT-PBO Problem Experimental Results ConclusionsDependencies solving turbo 1 1 engine 2 2 1 wheel tyre conflicts car 2 3 2 1 0 glass 1 window 1 2 door 2 glass 2 Install car Need to install the dependencies / avoid conflicts NP-problem Trezentos APT-PBO 6/ 23
  11. Introduction APT-PBO Architecture Experimental Results Algorithm ConclusionsAgenda 1 Introduction Problem 2 APT-PBO Architecture Algorithm 3 Experimental Results Unmet dependencies analysis Meta-installers performance Solutions assessment Multicriteria 4 Conclusions Trezentos APT-PBO 7/ 23
  12. Introduction APT-PBO Architecture Experimental Results Algorithm ConclusionsAPT-PBO Architecture pboinstall: encoding of the problem Trezentos APT-PBO 8/ 23
  13. Introduction APT-PBO Architecture Experimental Results Algorithm ConclusionsAPT-PBO Architecture pboinstall: encoding of the problem PBO solver: external solver Trezentos APT-PBO 8/ 23
  14. Introduction APT-PBO Architecture Experimental Results Algorithm ConclusionsAPT-PBO Architecture pboinstall: encoding of the problem PBO solver: external solver Parsing / processing: analyse the solution and iterate Trezentos APT-PBO 8/ 23
  15. Introduction APT-PBO Architecture Experimental Results Algorithm ConclusionsAPT-PBO Architecture pboinstall: encoding of the problem PBO solver: external solver Parsing / processing: analyse the solution and iterate apt-get install: install packages Trezentos APT-PBO 8/ 23
  16. Introduction APT-PBO Architecture Experimental Results Algorithm ConclusionsAPT-PBO Algorithm Require: Package to install p1 , Pol 1: repeat 2: (f , c) ← call_pboinstall(p1 , Pc , Pol, R, PI) 3: S ← call_solver (f , c) 4: Pc ← 0 5: for all pi ∈ S such that pi = 0 do 6: Pc ← check _rdeps(pi ) 7: end for 8: for all pj ∈ S such that pj = 1 do 9: Pc ← check _rconfs(pj ) 10: end for 11: until Pc = 0 12: return f , c Trezentos APT-PBO 9/ 23
  17. Introduction APT-PBO Architecture Experimental Results Algorithm ConclusionsMulticriteria If we try to satisfy different criteria, we have a MCDM (Multicriteria Decision Making problem) Trezentos APT-PBO 10/ 23
  18. Introduction APT-PBO Architecture Experimental Results Algorithm ConclusionsMulticriteria If we try to satisfy different criteria, we have a MCDM (Multicriteria Decision Making problem) APT-PBO integrates different objective function as a multiobjective problem (MOP) and transforming into a single objective problem through weighted sum scalarization: 3 min Wk · fk (P) k =1 and therefore: min (Wr · f1 (P) + Wp · f2 (P) + Wv · f3 (P)) Trezentos APT-PBO 10/ 23
  19. Introduction Unmet dependencies analysis APT-PBO Meta-installers performance Experimental Results Solutions assessment Conclusions MulticriteriaAgenda 1 Introduction Problem 2 APT-PBO Architecture Algorithm 3 Experimental Results Unmet dependencies analysis Meta-installers performance Solutions assessment Multicriteria 4 Conclusions Trezentos APT-PBO 11/ 23
  20. Introduction Unmet dependencies analysis APT-PBO Meta-installers performance Experimental Results Solutions assessment Conclusions MulticriteriaUnmet dependencies analysis ksplash kdelibs4c2a libc6 libgcc1 libstdc++6 kdebase-data libx11-6 libxext6 3.5.9.dfsg.1-6 4.2.2-1 Meta-installer Possible No Wrong Solutions Solutions Solutions Apt-get 591 123 0 Aptitude 713 0 1 Smart 714 0 0 Apt-pbo 714 0 0 Trezentos APT-PBO 12/ 23
  21. Introduction Unmet dependencies analysis APT-PBO Meta-installers performance Experimental Results Solutions assessment Conclusions MulticriteriaMeta-installers performance 00-14 apt-get aptitude smart 00-12 apt-pbo 00-10 Execution time (seconds) 00-08 00-06 00-04 00-02 00-00 0 20 40 60 80 100 120 140 Problem size (# installed packages) Meta-installer Average Time Standard Deviation Apt-get 00:00.21 00:00.17 Aptitude 00:00.62 00:00.15 Smart 00:02.63 00:00.25 Apt-pbo 00:03.77 00:01.91 Trezentos APT-PBO 13/ 23
  22. Introduction Unmet dependencies analysis APT-PBO Meta-installers performance Experimental Results Solutions assessment Conclusions MulticriteriaSolutions assessment Each package transaction can include installation, update, removal or downgrade In 1.000 package transactions, how each meta-installer behaves? Tool Installed Updated Removed Down- graded apt-get 7,766 17 12 0 aptitude 8,423 18 161 464 smart 7,786 92 124 479 PBO freshness 6,808 20,449 25 567 PBO removal 7,767 11 162 443 PBO number 7,729 13 102 500 Trezentos APT-PBO 14/ 23
  23. Introduction Unmet dependencies analysis APT-PBO Meta-installers performance Experimental Results Solutions assessment Conclusions MulticriteriaSolutions assessment Downgrade Remove Updates Install % of total A A Sm PB PB PB pt pt O O O ar -g itu -F -R -N t et de r e um es m hn ov be es al r s Trezentos APT-PBO 15/ 23
  24. Introduction Unmet dependencies analysis APT-PBO Meta-installers performance Experimental Results Solutions assessment Conclusions MulticriteriaMulti-criteria In APT-PBO, varying the weights, we can have different solutions. Trezentos APT-PBO 16/ 23
  25. Introduction Unmet dependencies analysis APT-PBO Meta-installers performance Experimental Results Solutions assessment Conclusions MulticriteriaMulti-criteria In APT-PBO, varying the weights, we can have different solutions. For example, varying freshness weight we can obtain different solutions for package at-spi: Aggressive Conservative Install 9 37 Updates 35 35 Remove 1 0 Downgrade 7 10 Time 00:19.45 00:17.37 Trezentos APT-PBO 16/ 23
  26. Introduction Unmet dependencies analysis APT-PBO Meta-installers performance Experimental Results Solutions assessment Conclusions Multicriteriaap-spi - conservative freshness To avoid the removal of “file-roller” we perform the installation of 28 extra-packages libgconf2-4 conflicts < 2.24 libbonobo2-0 at-spi 2.26 -> 2.22 2.22 1.22 breaks < 2.24 file-roller breaks < 2.24 libnautilus-extension1 ..+2 2.26 ->2.22 2.26 ->2.20 libgnomevfs2-0 ...+24 2.22 libhal1 0.5 Trezentos APT-PBO 17/ 23
  27. Introduction Unmet dependencies analysis APT-PBO Meta-installers performance Experimental Results Solutions assessment Conclusions Multicriteriaap-spi - agressive freshness With “just” one removal of “file-roller” with avoid the installation of 28 packages and the downgrade of 3. libgconf2-4 conflicts < 2.24 libbonobo2-0 at-spi 2.26 -> 2.22 2.22 1.22 libnautilus-extension1 breaks < 2.24 file-roller 2.26 2.26 ->2.22 Trezentos APT-PBO 18/ 23
  28. Introduction APT-PBO Experimental Results ConclusionsAgenda 1 Introduction Problem 2 APT-PBO Architecture Algorithm 3 Experimental Results Unmet dependencies analysis Meta-installers performance Solutions assessment Multicriteria 4 Conclusions Trezentos APT-PBO 19/ 23
  29. Introduction APT-PBO Experimental Results ConclusionsConclusions APT-PBO is a freely available tool (GPL) that can be tested, available for Debian, Mandriva and Caixa Magica Trezentos APT-PBO 20/ 23
  30. Introduction APT-PBO Experimental Results ConclusionsConclusions APT-PBO is a freely available tool (GPL) that can be tested, available for Debian, Mandriva and Caixa Magica PBO encoding proved to be suitable for the problem and provides extra-flexibility compared with SAT tools Trezentos APT-PBO 20/ 23
  31. Introduction APT-PBO Experimental Results ConclusionsConclusions APT-PBO is a freely available tool (GPL) that can be tested, available for Debian, Mandriva and Caixa Magica PBO encoding proved to be suitable for the problem and provides extra-flexibility compared with SAT tools Multi-criteria is a desirable and achievable option Trezentos APT-PBO 20/ 23
  32. Introduction APT-PBO Experimental Results ConclusionsConclusions APT-PBO is a freely available tool (GPL) that can be tested, available for Debian, Mandriva and Caixa Magica PBO encoding proved to be suitable for the problem and provides extra-flexibility compared with SAT tools Multi-criteria is a desirable and achievable option Performance is an issue for large repositories and some combination of weights. Trezentos APT-PBO 20/ 23
  33. Introduction APT-PBO Experimental Results ConclusionsFuture work Better tuning of PBO encoding and work with PBO solver researchers to improve performance issues Trezentos APT-PBO 21/ 23
  34. Introduction APT-PBO Experimental Results ConclusionsFuture work Better tuning of PBO encoding and work with PBO solver researchers to improve performance issues Support new features like using APT-PBO for removals,et all Trezentos APT-PBO 21/ 23
  35. Introduction APT-PBO Experimental Results ConclusionsFuture work Better tuning of PBO encoding and work with PBO solver researchers to improve performance issues Support new features like using APT-PBO for removals,et all Enhance interactive mode Trezentos APT-PBO 21/ 23
  36. Introduction APT-PBO Experimental Results ConclusionsMore information Paulo Trezentos, Ines Lynce, and Arlindo L. Oliveira. Apt-pbo: solving the software dependency problem using pseudo-boolean optimization. In ASE 10: Proceedings of the IEEE/ACM international conference on Automated software engineering, pages 427-436, New York, NY, USA, 2010. ACM Trezentos APT-PBO 22/ 23
  37. Introduction APT-PBO Experimental Results ConclusionsMore information Paulo Trezentos, Ines Lynce, and Arlindo L. Oliveira. Apt-pbo: solving the software dependency problem using pseudo-boolean optimization. In ASE 10: Proceedings of the IEEE/ACM international conference on Automated software engineering, pages 427-436, New York, NY, USA, 2010. ACM http://aptpbo.caixamagica.pt Trezentos APT-PBO 22/ 23
  38. Introduction APT-PBO Experimental Results ConclusionsThank you. Questions. Trezentos APT-PBO 23/ 23

×