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

Liviu Chircu noreply at github.com
Mon Jun 7 09:33:42 EST 2021


  Branch: refs/heads/2.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 5106ccb5c43172ea04e7d9efa1ebdc361a1648ea
      https://github.com/OpenSIPS/opensips/commit/5106ccb5c43172ea04e7d9efa1ebdc361a1648ea
  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

  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