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

Liviu Chircu noreply at github.com
Mon Jun 7 09:28:46 EST 2021


  Branch: refs/heads/3.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 72bbc4cf42a7c2aeac63f8a2e325ec8d7b53d669
      https://github.com/OpenSIPS/opensips/commit/72bbc4cf42a7c2aeac63f8a2e325ec8d7b53d669
  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