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

(PUP-5693) Make function_loading benchmark operational #4577

Conversation

@hlindberg
Copy link
Contributor

hlindberg commented Jan 18, 2016

Before this the function_loading benchmark failed with a out of stack
error. This was caused by a combination of the deep recursion set up by
the benchmark, and that the rutime needs additional stack levels per
call.

The benchmark logic also had flaws that had gone undetected in older
puppet versions. Now with stricter module visibility rules the benchmark
generated modules did not have the correct deendencies in meta data.

This changes the recursion to not go as deep and fixes the module
dependency problems. The number of runs/modules/funcions were also
lowered to reduce the running time of the benchmark as he additional
iterations does not provide more information.

One problem remains - each iteration takes about 25% longer than the
previous. There could be a natural explanatoin for this (GC), but
manually performing gc beteeen runs did not change the outcome. Newer
riibies performed better, but still with degradation of the performance.
It looks like there is either a memory leak (either real, or caused by
the benchmark's construction).

This also corrects a typo in the base_loader that would cause an
error-reporting case to fail with a method not found instead of the
actual error.

@hlindberg hlindberg added the Language label Jan 18, 2016
Before this the function_loading benchmark failed with a out of stack
error. This was caused by a combination of the deep recursion set up by
the benchmark, and that the rutime needs additional stack levels per
call.

The benchmark logic also had flaws that had gone undetected in older
puppet versions. Now with stricter module visibility rules the benchmark
generated modules did not have the correct deendencies in meta data.

This changes the recursion to not go as deep and fixes the module
dependency problems. The number of runs/modules/funcions were also
lowered to reduce the running time of the benchmark as he additional
iterations does not provide more information.

One problem remains - each iteration takes about 25% longer than the
previous. There could be a natural explanatoin for this (GC), but
manually performing gc beteeen runs did not change the outcome. Newer
riibies performed better, but still with degradation of the performance.
It looks like there is either a memory leak (either real, or caused by
the benchmark's construction).

This also corrects a typo in the base_loader that would cause an
error-reporting case to fail with a method not found instead of the
actual error.
@hlindberg hlindberg force-pushed the hlindberg:PUP-5693_benchmark-function-loading-blows-stack branch from d63e70f to 84d00b1 Jan 18, 2016
thallgren added a commit that referenced this pull request Jan 19, 2016
…oading-blows-stack

(PUP-5693) Make function_loading benchmark operational
@thallgren thallgren merged commit b3f7d95 into puppetlabs:master Jan 19, 2016
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hlindberg hlindberg deleted the hlindberg:PUP-5693_benchmark-function-loading-blows-stack branch Sep 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.