* [RFC] rte_acl_build memory fragmentation concern and proposal for external memory support
@ 2025-11-14 2:51 mannywang(王永峰)
0 siblings, 0 replies; only message in thread
From: mannywang(王永峰) @ 2025-11-14 2:51 UTC (permalink / raw)
To: dev; +Cc: konstantin.v.ananyev
[-- Attachment #1: Type: text/plain, Size: 1589 bytes --]
Problem Statement
Hello DPDK community,
We've been using DPDK's ACL library in a long-running network application and observed a concerning issue regarding memory fragmentation. The rte_acl_build()function internally uses rte_zmalloc_socket()for dynamic memory allocation during ACL rule compilation.
While this design works well for short-lived processes, it creates challenges for long-running applications (days/weeks) where memory fragmentation becomes a critical concern. Each ACL rebuild (due to rule updates, configuration changes, etc.) allocates variable-sized memory blocks for the trie structures and transition tables, which are then freed when the ACL context is destroyed or rebuilt.
This pattern leads to:
1. Memory fragmentation over time, as the heap accumulates "holes" of varying sizes
2. Potential allocation failures even when total free memory appears sufficient
3. Difficulty in memory budgeting for deterministic systems
Current Limitation
The current API doesn't allow applications to provide pre-allocated memory for ACL construction, forcing dynamic allocations that contribute to heap fragmentation. This is particularly problematic for applications that prioritize long-term stability and predictable memory usage.
Proposed Solution
We propose extending the ACL API to support external memory buffers for the build process. This would allow applications to manage memory allocation strategies according to their specific requirements (pool-based, static allocation, etc.).
发自我的企业微信
[-- Attachment #2: Type: text/html, Size: 15755 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-15 17:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-14 2:51 [RFC] rte_acl_build memory fragmentation concern and proposal for external memory support mannywang(王永峰)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).