to be precise: “memory { main-heap-size 16G }” or something along these lines 
is what might be useful for your config.

--a

> On 25 May 2021, at 14:40, Andrew 👽 Yourtchenko <ayour...@gmail.com> wrote:
> 
> There is no way to gracefully fail an insertion into a bihash - it either 
> succeeds or you get a crash.
> 
> The max session limit attempts to guard against that, by failing the addition 
> using the heuristic number. You dialed this number up to 20 mil, so no more 
> safe guard - which is what you observe.
> 
> But you are still running at a default heap size. “heapsize” parameter allows 
> to change that.
> 
> As there is no hard and fast formula how much memory the bihash will consume, 
> it’s up to you to tune the above two variables such that there is happiness.
> 
> --a
> 
>> On 23 May 2021, at 08:14, NetHappy <nethappys...@gmail.com> wrote:
>> 
>> Hi An drew,
>> 
>> Myself modified the code to suit some requirement. The plain vpp acl module 
>> also crashes in similar situation. 
>> I am expecting the vpp should crash while trying to add more sessions. The 
>> system has 64 GB RAM and vpp was using  3.44% of the memory while crashing. 
>> So the system is not out of memory but its not configured to use the 
>> available memory.
>> 
>> The relevant crash bt is this
>> 
>> #5  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
>> #6  0x00007f2fba309859 in __GI_abort () at abort.c:79
>> #7  0x00007f2fba4e0bba in os_panic () at 
>> /root/code/vpp/src/vppinfra/unix-misc.c:221
>> #8  os_out_of_memory () at /root/code/vpp/src/vppinfra/unix-misc.c:221
>> #9  0x00007f2fba721701 in clib_mem_alloc_aligned_at_offset 
>> (os_out_of_memory_on_failure=1, align_offset=0, align=64, size=98368) at 
>> /root/code/vpp/src/vppinfra/mem.h:243
>> #10 clib_mem_alloc_aligned (align=64, size=98368) at 
>> /root/code/vpp/src/vppinfra/mem.h:263
>> #11 alloc_aligned_16_8 (nbytes=12288, h=0x7f2f79d59998 <acl_main+728>) at 
>> /root/code/vpp/src/vppinfra/bihash_template.c:77
>> #12 value_alloc_16_8 (h=0x7f2f79d59998 <acl_main+728>, log2_pages=<optimized 
>> out>) at /root/code/vpp/src/vppinfra/bihash_template.c:462
>> #13 0x00007f2fbabdaefd in split_and_rehash_16_8 (h=h@entry=0x7f2f79d59998 
>> <acl_main+728>, old_values=old_values@entry=0x7f2faf1d9a00, 
>>    old_log2_pages=old_log2_pages@entry=5, 
>> new_log2_pages=new_log2_pages@entry=7) at 
>> /root/code/vpp/src/vppinfra/bihash_template.c:581
>> #14 0x00007f2fbabdcbd0 in clib_bihash_add_del_inline_with_hash_16_8 
>> (arg=0x0, is_stale_cb=0x0, is_add=1, hash=<optimized out>, 
>> add_v=0x7f19a6991b48, 
>>    h=0x7f2f79d59998 <acl_main+728>) at 
>> /root/code/vpp/src/vppinfra/bihash_template.c:901
>> #15 clib_bihash_add_del_inline_16_8 (arg=0x0, is_stale_cb=0x0, is_add=1, 
>> add_v=0x7f19a6991b48, h=0x7f2f79d59998 <acl_main+728>)
>>    at /root/code/vpp/src/vppinfra/bihash_template.c:985
>> #16 clib_bihash_add_del_16_8 (h=h@entry=0x7f2f79d59998 <acl_main+728>, 
>> add_v=add_v@entry=0x7f19a6991b48, is_add=is_add@entry=1)
>>    at /root/code/vpp/src/vppinfra/bihash_template.c:992
>> #17 0x00007f2f798bc8b5 in acl_fa_add_session 
>> (current_policy_epoch=<optimized out>, p5tuple=0x7f2f7cd5bc58, 
>> now=7927760728493450, sw_if_index=<optimized out>, is_ip6=0, 
>>    is_input=0, am=<optimized out>) at 
>> /root/code/vpp/src/plugins/acl/session_inlines.h:577
>> #18 acl_fa_inner_node_fn (reclassify_sessions=1, node_trace_on=0, 
>> with_stateful_datapath=1, is_l2_path=1, is_input=0, is_ip6=0, 
>> frame=0x7f2f8c5f6440, 
>>    node=0x7f2f8d6de980, vm=0x7f2f8d6f3dc0) at 
>> /root/code/vpp/src/plugins/acl/dataplane_node.c:1137
>> #19 acl_fa_outer_node_fn (do_stateful_datapath=1, is_l2_path=1, is_input=0, 
>> is_ip6=0, frame=0x7f2f8c5f6440, node=0x7f2f8d6de980, vm=0x7f2f8d6f3dc0)
>>    at /root/code/vpp/src/plugins/acl/dataplane_node.c:1428
>> #20 acl_fa_node_fn (is_l2_path=1, is_input=0, is_ip6=0, 
>> frame=0x7f2f8c5f6440, node=0x7f2f8d6de980, vm=0x7f2f8d6f3dc0)
>>    at /root/code/vpp/src/plugins/acl/dataplane_node.c:1456
>> #21 acl_out_l2_ip4_node_fn_hsw (vm=0x7f2f8d6f3dc0, node=0x7f2f8d6de980, 
>> frame=0x7f2f8c5f6440) at /root/code/vpp/src/plugins/acl/dataplane_node.c:1569
>> #22 0x00007f2fba595fa6 in dispatch_node (last_time_stamp=<optimized out>, 
>> frame=0x7f2f8c5f6440, dispatch_state=VLIB_NODE_STATE_POLLING, 
>> type=VLIB_NODE_TYPE_INTERNAL, 
>>    node=0x7f2f8d6de980, vm=0x7f2f8d6de980) at 
>> /root/code/vpp/src/vlib/main.c:1039
>> #23 dispatch_pending_node (vm=vm@entry=0x7f2f8d6f3dc0, 
>> pending_frame_index=pending_frame_index@entry=7, last_time_stamp=<optimized 
>> out>)
>>    at /root/code/vpp/src/vlib/main.c:1198
>> #24 0x00007f2fba5978ff in vlib_main_or_worker_loop (is_main=0, 
>> vm=0x7f2f8d6f3dc0) at /root/code/vpp/src/vlib/main.c:1662
>> #25 vlib_worker_loop (vm=vm@entry=0x7f2f8d6f3dc0) at 
>> /root/code/vpp/src/vlib/main.c:1796
>> #26 0x00007f2fba5c4bf8 in vlib_worker_thread_fn (arg=<optimized out>) at 
>> /root/code/vpp/src/vlib/threads.c:1872
>> #27 0x00007f2fba529cb0 in clib_calljmp () from 
>> /lib/x86_64-linux-gnu/libvppinfra.so.21.06
>> #28 0x00007f2f72896d10 in ?? ()
>> #29 0x00007f2f76976c5d in eal_thread_loop.cold () from 
>> /usr/lib/x86_64-linux-gnu/vpp_plugins/dpdk_plugin.so
>> #30 0x0000000000000000 in ?? ()
>> 
>> In the frame 18 before calling acl_fa_can_add_session, why 
>> acl_fa_can_add_session is not failing ? What Is best way to set 
>> configuration so that vpp able to use more RAM ? 
>> 
>> Thanks,
>> Mahamuda 
>> 
>> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19456): https://lists.fd.io/g/vpp-dev/message/19456
Mute This Topic: https://lists.fd.io/mt/77321080/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to