Skip to content
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

Performance regression in diff models in Tamarin 180 vs 161 #615

Open
swesemeyer opened this issue Feb 2, 2024 · 7 comments
Open

Performance regression in diff models in Tamarin 180 vs 161 #615

swesemeyer opened this issue Feb 2, 2024 · 7 comments

Comments

@swesemeyer
Copy link

Hi,

I have a diff model which runs within 2 minutes on my multi-core machine as it can use all 32 cores when I use Tamarin-161

However, running the same model using Tamarin-180, it seems to be restricted to using at most 2 cores resulting in a massive slowdown.

Has anyone else noticed this?

@swesemeyer
Copy link
Author

time tamarin-prover-180 model.spthy --diff --prove && date

yields:

processing time: 2897.92s

RHS : executability_A1_A2 (exists-trace): verified (3 steps)
LHS : executability_A1_A2 (exists-trace): verified (3 steps)
RHS : executability_A1_A3 (exists-trace): verified (3 steps)
LHS : executability_A1_A3 (exists-trace): verified (3 steps)
RHS : executability_A1_A4 (exists-trace): verified (3 steps)
LHS : executability_A1_A4 (exists-trace): verified (3 steps)
RHS : executability_success (exists-trace): verified (5 steps)
LHS : executability_success (exists-trace): verified (5 steps)
RHS : executability_failure (exists-trace): verified (5 steps)
LHS : executability_failure (exists-trace): verified (5 steps)
DiffLemma: Observational_equivalence : verified (899 steps)

==============================================================================

real 48m18.071s
user 70m38.063s
sys 5m9.406s
Fri 2 Feb 17:33:19 GMT 2024

while
time tamarin-prover-161 model.spthy --diff --prove && date
yields
RHS : executability_A1_A2 (exists-trace): verified (3 steps)
LHS : executability_A1_A2 (exists-trace): verified (3 steps)
RHS : executability_A1_A3 (exists-trace): verified (3 steps)
LHS : executability_A1_A3 (exists-trace): verified (3 steps)
RHS : executability_A1_A4 (exists-trace): verified (3 steps)
LHS : executability_A1_A4 (exists-trace): verified (3 steps)
RHS : executability_success (exists-trace): verified (5 steps)
LHS : executability_success (exists-trace): verified (5 steps)
RHS : executability_failure (exists-trace): verified (5 steps)
LHS : executability_failure (exists-trace): verified (5 steps)
DiffLemma: Observational_equivalence : verified (899 steps)

==============================================================================

real 1m3.381s
user 15m10.156s
sys 11m15.469s
Fri 2 Feb 18:54:09 GMT 2024

@swesemeyer
Copy link
Author

swesemeyer commented Feb 5, 2024

regression.spthy.zip

Please find attached a file that includes the model that exhibits the above behaviour.

Hopefully that will help troubleshoot the issue.

@swesemeyer
Copy link
Author

tamarin-prover-180 --version
tamarin-prover 1.8.0, (C) David Basin, Cas Cremers, Jannik Dreier, Simon Meier, Ralf Sasse, Benedikt Schmidt, 2010-2023

This program comes with ABSOLUTELY NO WARRANTY. It is free software, and you
are welcome to redistribute it according to its LICENSE, see
'https://github.com/tamarin-prover/tamarin-prover/blob/master/LICENSE'.

maude tool: 'maude'
checking version: 3.1. OK.
checking installation: OK.
Generated from:
Tamarin version 1.8.0
Maude version 3.1
Git revision: f172d7f, branch: master
Compiled at: 2023-11-11 13:11:25.424495998 UTC

@rsasse
Copy link
Member

rsasse commented Mar 12, 2024

Sorry for not responding quicker, but I have no idea what triggers this concretely. This is very unfortunate. Also, looking at the number it is not only a lack of parallelization, but some steps do seem to take longer, as it's 75 minutes (user+sys) vs 26 minutes.

No idea if that's a Tamarin internal issue, a Haskell version issue (different behavior of the runtime), or something else, so this will not be easy to debug.

@swesemeyer
Copy link
Author

swesemeyer commented Mar 14, 2024 via email

@rsasse
Copy link
Member

rsasse commented Mar 14, 2024

Hi Steve,

Sorry if that was not clear. The change of GHC+runtime is simply due to the different version of Tamarin being compiled with different GHC versions. There is nothing on your end to check or change.

Cheers,
Ralf

@swesemeyer
Copy link
Author

Just to add that this does not seem to be confined to just diff models.
I have noticed in my normal models that Tamarin only uses 2 or 3 cores for some goals (in interactive mode) while using all cores for others.
Running the same model in Tamarin 1.6.1 shows that it can make us of all cores when solving the same goal.

As a result, most of my models take less time to prove in 1.6.1 than in 1.8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants