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

Introduce delta snapshot utilities and zstd #81

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

eigenraven
Copy link
Collaborator

This introduces a zstd dependency and adds configurable delta snapshots with multiple encodings.

The different encoding formats (with/without pages, compressed/uncompressed, xor/overwrite mode) are tested to work, but I have not determined their individual overheads and benefits so far.

Squashed commits:

Read/write basic types as bytes into util

Delta encoding utilities including zstd

Fix linking errors with zstd

Add delta encoding to log

Don't encode unchanged all-zero pages

Fix from-scratch build with zstd

Cleanup for PR

FetchContent_MakeAvailable actually requires cmake 3.14

Clang-format the updated files
Copy link
Collaborator

@csegarragonz csegarragonz left a comment

Choose a reason for hiding this comment

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

Hey @KubaSz , thanks for this! I am leaving the bulk of the review for Simon, but just pointed out one minor thing as I skimmed through the code.

@@ -28,7 +28,7 @@ include(cmake/ExternalProjects.cmake)
function(faabric_lib lib_name lib_deps)
# "Normal" library used for linking internally
add_library(${lib_name} ${lib_deps})
target_include_directories(${lib_name}
Copy link
Collaborator

Choose a reason for hiding this comment

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

clang-format removes trailing whitespaces, but we have no linting for CMake files. Thus the unpleasant and misleading diff. I agree though that removing trailing whitespaces is nice. Should we "unofficially" enforce this ourselves @Shillaker ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes I think it's great that Jakub is cleaning up all this unnecessary whitespace 😂 . We'll have to do a big clear-up ourselves but this can definitely stay as a start.

@@ -26,6 +26,7 @@ class SystemConfig
std::string captureStdout;
std::string stateMode;
std::string wasmVm;
std::string deltaSnapshotEncoding;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add a very simple test for setting and unsetting this value in tests/test/util/test_config.cpp?

Copy link
Collaborator

@Shillaker Shillaker Apr 21, 2021

Choose a reason for hiding this comment

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

Yes that's the only thing I'd add, but I'll be doing some work on this so can add it myself.

@@ -28,7 +28,7 @@ include(cmake/ExternalProjects.cmake)
function(faabric_lib lib_name lib_deps)
# "Normal" library used for linking internally
add_library(${lib_name} ${lib_deps})
target_include_directories(${lib_name}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes I think it's great that Jakub is cleaning up all this unnecessary whitespace 😂 . We'll have to do a big clear-up ourselves but this can definitely stay as a start.

@@ -26,6 +26,7 @@ class SystemConfig
std::string captureStdout;
std::string stateMode;
std::string wasmVm;
std::string deltaSnapshotEncoding;
Copy link
Collaborator

@Shillaker Shillaker Apr 21, 2021

Choose a reason for hiding this comment

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

Yes that's the only thing I'd add, but I'll be doing some work on this so can add it myself.

@Shillaker
Copy link
Collaborator

LGTM 👍

@Shillaker Shillaker merged commit 3a85933 into faasm:master Apr 21, 2021
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.

3 participants