-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next: investigate gringo/aspcud performances #2534
Comments
Also, it tends to take indecent amounts of RAM, up to 2Go. |
Yes, I have seen that as well and started investigating; the main cost (~80%) seems to be due simply to the too many versions of There is also a huge cost on If you're interested, you can also try with |
I'm going to try packup and report if it's any better. An alternative solution, which is related to another feature request, is to never upgrade the compiler unless explicitly asked for. We could mark a package as not to be upgraded (that would be for compilers, but also for coq and other very costly package to recompile). A bit like pinning a version, but automatic, with easier upgrade and a UX that tells you when you can upgrade (but doesn't do it). |
That's actually what's currently done (explicit changes will be refused unless the package is pinned; and the solver is given a |
Ah, right, so it's indeed purely a solver issue then as you said. |
Some thoughts on this: the fact that only a single version of a given package can be installed at a time is expressed in cudf through a self-conflict: in opam, we always have
Conflicts are, as I understand it, what makes the raw problem difficult to solve. And given how it's encoded in cudf, I suspect that the solvers don't have special handling for self-conflicts (it's OK in debian because they never have many conflicting versions). With the |
the problem here, I think, is related to the growing number of versions of each package/compiler present in an opam repository. Aspcud was created to efficiently solve problems where the number of available versions for each package is small or one (as in software distribution a la debian). As the number of different versions for each package grows, aspcud, that is not optimized for these kind of problems, will start to consume more memory and it performances might degrade. Reducing the number of available version might work in the mean time, but this is just a hack. Setting up a QA policy to regularly cleaning up the repository, removing old, broken packages could be a more viable long term strategy. On our side, we should work with the aspcud people to adapt the model to this class of problems, or many using a different solver. mccs could be a good candidate. I discourage the use of pack-up as it is known to provide wrong answers from time to time. |
I have indeed experienced with |
Instead of creating a different repository, maybe it might be worth exploring the possibility of filtering the packages versions that you pass to the solver. This could be configured by the user. For example, by default, only the latest 3 stable compiler releases are considered and only the last 3 major stable releases for each package. This would greatly speed up the solver without too much work. |
This resolves for the most part the solving delay issues for 2.0~alpha (ocaml#2534, ocaml#2548), but needs more testing
Still suffering from the issue. |
Hi Frederic, As a (very rough) rule of thumb, the more conflicts and disjunctions are present Aspcud was designed to work well on Debian-like instances where one has 2/3 Roberto On Thu, Nov 17, 2016 at 01:52:06AM -0800, Frédéric Bour wrote:
Roberto |
@rdicosmo thanks for your answer. PS 1: I remember seeing you talking about the mancoosi project :) |
Hi Frederic, no problem at all : as you know, I'm now fully busy on 2016-11-17 22:07 GMT+01:00 Frédéric Bour notifications@github.com:
Roberto Di Cosmo Professeur (on leave at/detache a INRIA Roquencourt) F-75205 Paris Cedex 13 FRANCEOffice location: Paris Diderot INRIA Bureau 3020 (3rd floor) Bureau C123 Metro ligne 14/RER C Ligne 14/RER A: Gare de LyonGPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3 |
By the way, it would be very useful to keep a copy of the CUDF files
corresponding to the explosive cases: these will make fantastic benchmarks
for the next solver competition.
Indeed, for the case of Debian packages we have solvers that behave well
and we stopped running solver comptetitions, but the Opam use case is
different and may require to revamp the compeitions if there are enough new
challenging benchmarks.
|
@rdicosmo good point; do you have a preferred place where they should be stored, or should we mail them directly to you ? |
@AltGr: just create a github repo, and add the .cudf file there (ideally, also On Mon, Nov 21, 2016 at 12:58:37AM -0800, Louis Gesbert wrote:
Roberto Di Cosmo Professeur (on leave at/detache a INRIA Roquencourt) F-75205 Paris Cedex 13 FranceOffice location: Paris Diderot INRIA Bureau 3020 (3rd floor) Bureau C123 Metro ligne 14/RER C Ligne 14/RER A: Gare de LyonGPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3 |
@AltGr The performance is still not fabulous, in particular in switches where |
Ouch. We've been suffering from extremely slow opam performance (30s and more to compute a solution) more and more recently (this is all on opam 1.2.2), and this would explain it. To work around opam's lack of dependencies on a particular git commit (#2762), we automatically publish every single commit (actually: every single head that gets pushed and passes CI) of our project into an opam repo. So, we have lots of versions -- probably close to 100 by now. Not that this should make any difficulty, the dependency is always of the form "I want this exact version". But somehow the solver doesn't seem smart enough to use that to its benefit? I haven't tried opam 2.0 yet; does this issue being closed mean that performance has significantly improved? |
I just started having this problem. running |
You can try another solver. For instance, mccs helped me, while aspcud consumes all of my 12Gb. p. s.
|
@bobpoekert what version of opam is that on ? |
@AltGr 2.0.3 |
With opam 2.0, gringo/aspcud takes much longer than it used to do. I'm not sure if it's a regression in gringo (that I upgraded not-so-long ago) or the new compiler-as-package that is much more stressful for the checker, but it's probably worth investigating either way.
I don't have a specific query to propose, it's rather systematic. Trying to upgrade the compiler (in particular in a switch where it's not authorized) seemed much worse.
The text was updated successfully, but these errors were encountered: