Skip to content

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

@lamont-granquist

Description

@lamont-granquist

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions