[go: up one dir, main page]

Optimize storage snapshot tezt

This simple aims to reduce the memory usage of the storage snapshot export and import. It reduces the ram consumption from 6.2Gb to 4.2Gb (see below for the ram estimates). As a counter part, it increases the execution time a bit, from ~50s to 1m09.

Manually testing the MR

Here is how I've measured the ram consumption. Not sure it actually reflects the exact usage, but it seems decent enough.

  • run the test time dune exec tezt/tests/main.exe -- --match 'Alpha: storage snapshot export and import'
  • run the magic command while true; do ps -o rss -C octez-node | awk '{rss += $1} END {print rss}' &>> rss.log; sleep 0.1;
  • when the test is done kill the magic command
  • get the highest ram consumption during the test with cat rss.log| sort -n | tail -n 1

Checklist

  • [n/a] Document the interface of any function added or modified (see the coding guidelines)
  • [n/a] Document any change to the user interface, including configuration parameters (see node configuration)
  • [n/a] Provide automatic testing (see the testing guide).
  • [n/a] For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports

Loading