ATS memory continuous increase caused by free list
ATS memory much larger than expected(how to sloved?)
env
- CPU: 64 core
- memory :256G
- OS: CentOS
- ATS Version: 8.1.3
ATS configuration
- ram_cache: 100G
what happended
- memory cost upto 200G even ram_cache only configured 100G:

why?
-
the freelist held by ioBufAllocator alloc too much memory and never free, the memory dump below:

-
It is an known issue that freelist[i] (i from 0 ~ 14) maybe "in use" and cost memory then "not use" but never return memory to OS, example below has a maxim memory twice then expeceted, and if 100G ram_cache, the worse case, it will exhaust 15 * 100G = 1500 G memory:

-
i know the reclaimable-free-list has been introduced in ATS 4.0.x to solve the problem but then removed,i want to know how to solve this issue in alternatively?
Have you tried turning off freelist? This is how we are running ATS in production:
-bash-4.2$ grep binary records.config
CONFIG proxy.config.proxy_binary_opts STRING -M -f -F
Documentation on the options: https://docs.trafficserver.apache.org/appendices/command-line/traffic_server.en.html#traffic-server
While -f will return memory allocated back to the OS, it will also greatly increase the number of malloc, free and (sometimes most importantly) madvise calls. On a high transaction server, this can have an impact on performance. If you run with the -f option, I recommend that you configure jemalloc or mimalloc as well as they have their own internal freelists that will return memory to the OS eventually. The -F option doesn't apply to ioBufAllocator as these are not proxy allocated.
Have you tried turning off freelist? This is how we are running ATS in production:
-bash-4.2$ grep binary records.config CONFIG proxy.config.proxy_binary_opts STRING -M -f -FDocumentation on the options: https://docs.trafficserver.apache.org/appendices/command-line/traffic_server.en.html#traffic-server
thanks for your suggestion, i will try to turn off free list and using jemalloc to instead of free list
While
-fwill return memory allocated back to the OS, it will also greatly increase the number of malloc, free and (sometimes most importantly) madvise calls. On a high transaction server, this can have an impact on performance. If you run with the-foption, I recommend that you configure jemalloc or mimalloc as well as they have their own internal freelists that will return memory to the OS eventually. The-Foption doesn't apply to ioBufAllocator as these are not proxy allocated.
i will configure jemalloc, thanks
While
-fwill return memory allocated back to the OS, it will also greatly increase the number of malloc, free and (sometimes most importantly) madvise calls. On a high transaction server, this can have an impact on performance. If you run with the-foption, I recommend that you configure jemalloc or mimalloc as well as they have their own internal freelists that will return memory to the OS eventually. The-Foption doesn't apply to ioBufAllocator as these are not proxy allocated.i will configure jemalloc, thanks
the reclaimable-free-list has been introduced in ATS 4.0.x, then remove the feature in ATS 5.0.x, i want to know whether the "buddy allocation scheme" still be considered ?

@dboyzhong I'm facing the same set of problems you are regarding RAM consumption by TrafficServer. Could you please tell me how you've enabled Jemalloc with the systemd setup? I already have an ATS build compiled with Jemalloc support, any help would be appreciated. Thanks.