Skip to content

Collect memory usage data #29

@pflanze

Description

@pflanze

We need checks for controlling memory usage.

There are two possible data sources:

  1. whole process usage as per kernel report (Linux)

  2. allocator statistics (userspace); this is expected to be much faster to retrieve and more precise and have more info (e.g. also number of allocations/frees, also per-thread?) than the data from the kernel.

And there are two possible logging approaches:

a. as linear log (to a separate file?) via polling, e.g. every 10 ms
b. log as part of probes

Approach b requires an efficient data source. Retrieving from the Kernel is about 150x slower than retrieving the real time (which is also via the kernel); thus that would necessitate to do the memory collection statistically in many places--either use EVOBENCH_SCOPE_EVERY and have all timings be statistical, but then many EVOBENCH_SCOPE probes would have to be changed to _EVERY; or do the memory collection at (yet) a lower frequency than the rest. Neither solution is very palatable. It appears that probes are best combined with a userspace data source.

So, the most sensible approach is to:

  1. implement whole process usage (from Kernel) via polling now.

  2. implement probe based collection via allocator statistics later.

Tackling step 1 now.

Metadata

Metadata

Assignees

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