[ https://issues.apache.org/jira/browse/TS-3178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14202104#comment-14202104 ]
Alan M. Carroll commented on TS-3178: ------------------------------------- I think we may want to change the original proxy allocator configuration value so the pair is something like {code} proxy.config.allocator.thread_free_list.high_watermark proxy.config.allocator.thread_free_list.low_watermark {code} We could do this for 5.X and put in some transitional code to read the old tag for size/high_watermark for compatibility. Use pre-increment and decrement. That is, {{--(l.allocated);}} etc. Rather than enclosing the {{return}} in the {{ifdef}}, why on enclose the rest in a {{#if !defined}}? {code} #if !defined(TS_USE_RECLAIMABLE_FREELIST) if (unlikely(count == 1)) { a.free(head); } else if (count > 0) { a.free_bulk(head, tail, count); } ink_assert(l.allocated >= thread_freelist_low_watermark); #endif } {code} You should put a comment on the count argument to the low level free functions that it is there only for accounting, to keep the memory counters correct. > ProxyAllocator improvements > --------------------------- > > Key: TS-3178 > URL: https://issues.apache.org/jira/browse/TS-3178 > Project: Traffic Server > Issue Type: Improvement > Components: Core > Reporter: Brian Geffon > Assignee: Cynthia Gu > Attachments: patch.diff > > > Currently when a ProxyAllocator (Thread Local) has more than a > configurable number of elements it will return them one-by-one to a > ClassAllocator (Global Freelist). Returning every item in this fashion is > inefficient as we'll likely need more items in the future. Therefore we > should maintain a low watermark (a minimum number) of items that should be in > a ProxyAllocator at any one time. When the number of elements reaches high > watermark, the free up is triggers to keep it below the low > watermark. Additionally, the free should be a block free instead of > one-by-one as we can reduce several hundred compare-and-swap operations to a > single CAS -- This message was sent by Atlassian JIRA (v6.3.4#6332)