Skip to content

Conversation

@shijith
Copy link

@shijith shijith commented Jun 14, 2019

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

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>
@baonq-me
Copy link

@shijith @robdinh Should we merge this PR ?

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