Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cache executor files#553

Merged
yesnault merged 4 commits intoovh:masterfrom
philippgille:cache-executor-files
Jun 15, 2022
Merged

Cache executor files#553
yesnault merged 4 commits intoovh:masterfrom
philippgille:cache-executor-files

Conversation

@philippgille
Copy link
Contributor

@philippgille philippgille commented Jun 5, 2022

Hello 👋 ,

We're running Venom inside of a Docker container in some cases, while mounting the scenario and custom executor files from the host into the container. Depending on the OS and the Docker config, for example when on macOS and having the "new Virtualization framework" enabled, but "VirtioFS" disabled, file operations can be very slow in Docker. Now with Venom we noticed that custom executors are read dozens of times during scenario execution, adding up to a lot of time.

Here's a screenshot of an example problematic Docker configuration on macOS:
image

But even with both of those options disabled, or both enabled, the file I/O is not great. For example we have a scenario that takes 1m, and 10s of that is spent purely on reading custom executor files!

This PR fixes that.

It introduces an executor file cache, and reads each file only once.

Cc @christophe-dufour

PS: Maybe some other operations in the loop don't need to be repeated as well, but of those, they either don't take long (based on my measurements) and an optimization would have little impact, or the interpolation step (where an optimization would be nice) is a bit more complex to optimize, because for each registerUserExecutors call there can be new variable values so the interpolated result can't be cached, if my understanding is correct. And I wanted to keep this PR simple.

Signed-off-by: Philipp Gillé <[email protected]>
Signed-off-by: Philipp Gillé <[email protected]>
Signed-off-by: Philipp Gillé <[email protected]>
@philippgille philippgille force-pushed the cache-executor-files branch from 3a5bd7a to 74b989d Compare June 5, 2022 23:42
Signed-off-by: Philipp Gillé <[email protected]>
@philippgille philippgille marked this pull request as ready for review June 5, 2022 23:46
Copy link
Member

@yesnault yesnault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@christophe-dufour
Copy link
Contributor

Hey @yesnault

Thanks for approving the pull request :)

I've 2 questions:

  • Do you know when it will be merged?
  • Do you know when the next venom release will be?

We are using Venom a lot and that PR is bringing huge improvement

@ovh-cds
Copy link
Collaborator

ovh-cds commented Jun 15, 2022

CDS Report build-venom-a#883.0 ✘

  • Build
    • Build ✔
  • Tests
    • Acceptance Tests ✘

@yesnault
Copy link
Member

@christophe-dufour we try to make a release this week (need some Acceptance Tests update on our side before)

@yesnault yesnault merged commit 8719d07 into ovh:master Jun 15, 2022
@christophe-dufour
Copy link
Contributor

Awesome news. Thx for the update @yesnault

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

Successfully merging this pull request may close these issues.

4 participants

Comments