[OpenSIPS-Devel] [OpenSIPS/opensips] b433bd: F_MALLOC: Always perform an O(1) defragmentation o...

Liviu Chircu noreply at github.com
Mon Jun 7 09:29:04 EST 2021


  Branch: refs/heads/3.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: b433bd0b37a635ede7d6fdc4460af02e8eb368fe
      https://github.com/OpenSIPS/opensips/commit/b433bd0b37a635ede7d6fdc4460af02e8eb368fe
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2021-06-07 (Mon, 07 Jun 2021)

  Changed paths:
    M mem/f_malloc.c
    M mem/f_malloc.h
    M mem/f_malloc_dyn.h

  Log Message:
  -----------
  F_MALLOC: Always perform an O(1) defragmentation on free()

Changes:
    * remove the "memory space" runtime computation, as well as the 95%
	defragmentation "start threshold" (better performance!)
    * change the defragmentation heuristic from O(N) to O(1).  This way,
        we avoid any performance issues caused by _too much_
	defragmentation

The main idea is to get rid of the dreaded "not enough shared memory,
attempting defragmentation..." state, where SHM performance goes down
dramatically, to the point where SIP traffic processing may stall.

(cherry picked from commit fb9a377768f250a8f99a0e29f1fc9689d564dd5c)





More information about the Devel mailing list