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

Need a mode of operation where chef-zero runs in-memory but populates from the disk cache #285

Open
lamont-granquist opened this issue Jul 17, 2018 · 0 comments

Comments

@lamont-granquist
Copy link
Contributor

The disk-based chef-zero is incredibly slow since it has to round trip to disk constantly (it assumes someone else could have come along and written to the files on disk, so it constantly re-reads them as as source of truth, when in the >99% use case it is the only thing reading and writing to the disk state).

The in-memory chef-zero fires up with an entirely blank slate and then requires hitting the API with something like knife upload to sync the disk contents to the memory "server".

A better solution would be to fire up the in-memory chef-zero and have it directly access the filesystem to upload contents.

In this mode of operation the writes to the server would be lost. For many purposes with testing, though, that data is irrelevant anyway (test-kitchen and chefspec).

A heavier modification could also be made to chef-zero where after every operation it wrote any changed data to disk acting like a write-through cache, but for most purposes we don't need that (and its going to be added complexity and bugs).

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

1 participant