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

Inconsistencies along consecutive runs #43

Open
mmatera opened this issue Dec 1, 2021 · 3 comments
Open

Inconsistencies along consecutive runs #43

mmatera opened this issue Dec 1, 2021 · 3 comments

Comments

@mmatera
Copy link
Contributor

mmatera commented Dec 1, 2021

Running several times the same benchmark seems to produce quite different results. Here is an example of what happens if I run elementary.yaml
but with 1000 iterations (100 iterations seems to be worst):

elementary

I put this here, but maybe this is related to Mathics-core, where something similar happens when we call many times

mathics -e 'Timing[Do[<test expression>,{1000}]][[1]]' 
@mmatera
Copy link
Contributor Author

mmatera commented Dec 1, 2021

Looking for a way to reduce the fluctuations, I found this: https://pythonspeed.com/articles/consistent-benchmarking-in-ci/

Here are the results when I fix the PYTHONHASHSEED and disable Linux ASLR:

withfixhashseed

In any case, to get more accurate benchmarks, we should run the benchmarks many times for each branch, and store the average time obtained from these many runs.

@TiagoCavalcante
Copy link
Collaborator

TiagoCavalcante commented Dec 1, 2021

@mmatera I have seen that running the benchmarks in a container and not using your machine (or apt updateing it, ...) reduces the noise.

@mmatera
Copy link
Contributor Author

mmatera commented Dec 1, 2021

@TiagoCavalcante, OK, but since I was not running anything else during the benchmark, this would imply that there is some kind of memory effect between runs in a physical machine, that does not happen in a container. Maybe this is also related to #44, isn't it?

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