sonic-net / sonic-sairedis

SAI object interface to Redis database, as used in the SONiC project
Other
56 stars 259 forks source link

after apply_view, use malloc_trim to release memory to system #1400

Open inspurSDN opened 1 month ago

inspurSDN commented 1 month ago

why I did: after warm-reboot with all vlan members, syncd use memory up to 1.8g, and can not reduce to its normal state. what I did: this come from the glibc behavior, in the main heap, it almost not release memory to system, in apply view, huge memory used for compare logic, and do not use it again. so I add malloc_trim to release it.

kcudnik commented 3 weeks ago

How many clan members are in your case ? How did you counted that memory ?