disable heap trimming while running gzip benchmark #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
gzip dynamic memory allocation size per compression is 136K. It is above
malloc trim threshold of 128K. So heap will be trimmed on each loop as
we call free. It causes break system call to be called per loop and
impacts performance. Resulting benchmark data will be inaccurate.
Trimming can be disabled by setting MALLOC_TRIM_THRESHOLD_ to -1.
New allocations will also cause an increase in page faults. Below are
the results for gzip with quality 4 and single thread:
Page faults with trimming: 392,546
Page faults without trimming: 388
Signed-off-by: Shijith Thotton sthotton@marvell.com