augeas icon indicating copy to clipboard operation
augeas copied to clipboard

Massive slowdown with MALLOC_PERTURB_

Open Vogtinator opened this issue 1 year ago • 0 comments

During package builds and during development phase, openSUSE sets MALLOC_CHECK_=3 and MALLOC_PERTURB_=69 in the environment. This causes the glibc heap to be less "forgiving" to catch some bugs.

However, the MALLOC_PERTURB_=69 setting, which causes glibc to explicitly fill newly allocated and freed memory with that value, has a massive negative effect on augeas performance. The testsuite actually runs more than 20x slower!

FWICT, the bottleneck is that add_new_trans calls realloc very often, and glibc treats that like a new allocation + deallocation to be able to overwrite the old data. Maybe that can be optimized somehow?

Vogtinator avatar Jul 26 '22 15:07 Vogtinator