Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Improves IO performance for the report readers#104

Merged
sergiorg-hpc merged 6 commits intomasterfrom
iofix_readers
Oct 20, 2020
Merged

Improves IO performance for the report readers#104
sergiorg-hpc merged 6 commits intomasterfrom
iofix_readers

Conversation

@sergiorg-hpc
Copy link
Contributor

@sergiorg-hpc sergiorg-hpc commented Oct 9, 2020

Changes

IO:

  • Loop through rows (timesteps) instead of columns (node_ids).
    • Changes from tsteps * node_ids reads, to tsteps reads (i.e.,
      constant time in terms of IO, regardless of node_ids reqs.).
  • Read all node_ids in a buffer every timestep, between min and max
    offsets of node_ids requested.

Memory:

  • Allocate buffer before passing to HighFive to avoid extra and
    unnecessary memory allocations before reading.
  • Change data structure of node_ids/offsets from vector to map
    for faster search (from n^2 to nlogn).
  • In soma reports, assign values directly to return buffer instead
    of std::copy/memcpy.

New features and others:

  • Add support for strided reads, allowing to reduce the amount of
    timesteps (e.g., 1 by default, 2 for every 2 timesteps, etc.).
  • Eliminate duplicated code, avoid calling HDF5 metadata in every
    iteration, updated unit tests, and other minor changes.

Important note

Performance evaluations and other related discussions can be obtained here:
https://bbpteam.epfl.ch/project/issues/browse/REP-60
https://bbpteam.epfl.ch/project/issues/browse/BLPY-217

> IO:
  * Loop through rows (timesteps) instead of columns (node_ids).
      - Changes from tsteps * node_ids reads, to tsteps reads (i.e.,
        constant time in terms of IO, regardless of node_ids reqs.).
  * Read all node_ids in a buffer every timestep, between min and max
    offsets of node_ids requested.

> Memory
  * Allocate buffer before passing to HighFive to avoid extra and
    unnecessary memory allocations before reading.
  * Change data structure of node_ids/offsets from vector to map
    for faster search (from n^2 to nlogn).
  * In soma reports, assign values directly to return buffer instead
    of std::copy/memcpy.

> New features and others:
  * Add support for strided reads, allowing to reduce the amount of
    timesteps (e.g., 1 by default, 2 for every 2 timesteps, etc.).
  * Eliminate duplicated code, avoid calling HDF5 metadata in every
    iteration, updated unit tests, and other minor changes.
alkino
alkino previously approved these changes Oct 9, 2020
@alkino
Copy link
Member

alkino commented Oct 9, 2020

Really nice way to improve things

matz-e
matz-e previously approved these changes Oct 9, 2020
Copy link
Member

@matz-e matz-e left a comment

Choose a reason for hiding this comment

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

Great! Some nitpicks about the docs… if that's intentional, please ignore.

Copy link
Contributor

@mgeplf mgeplf left a comment

Choose a reason for hiding this comment

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

Very nice addition.

@sergiorg-hpc
Copy link
Contributor Author

sergiorg-hpc commented Oct 19, 2020

@jorblancoa and I went through all the comments and suggestions, and integrated everything (specially Jorge, thanks for the effort). Thanks for all the great feedback!

If no one has any additional comments, we are ready to close the PR and merge the changes!

alkino
alkino previously approved these changes Oct 19, 2020
@mgeplf mgeplf self-requested a review October 20, 2020 11:20
Copy link
Contributor

@mgeplf mgeplf left a comment

Choose a reason for hiding this comment

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

LGTM, nice work!

@sergiorg-hpc sergiorg-hpc merged commit 3bb0906 into master Oct 20, 2020
@sergiorg-hpc sergiorg-hpc deleted the iofix_readers branch October 20, 2020 12:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants