Hi Xuo,

Neale is the maintainer of the policer code.  Maybe he can chime in if it
is safe to simply mark the binary apis as multiple parallel vector safe
`am->is_mp_safe`.  There is a brief reference to this in the developer docs
[0].


[0]
https://fd.io/docs/vpp/master/gettingstarted/developers/binary_api_support.html


On Thu, Feb 25, 2021 at 10:20 AM Xuo Guoto via lists.fd.io <xuoguoto=
[email protected]> wrote:

> Hi List,
>
> We have been using policer_add_del and classify_add_del_session in single
> threaded VPP (ie one main thread only) and both API were giving decent
> performance, but after switching to multi thread VPP the performance seems
> be drastically less.
>
> To test this out a small test program was written which will add 10,000
> policer and classify table entries and measure the speed.
>
> In single threaded VPP the program took 2.19 sec while with 1 main and 2
> worker threads it took 115.89 sec. The tests were conducted without any
> traffic flowing through VPP.
>
> The python test program too is attached for reference.
>
> Platform and version are:
>
> vpp# sh version
> vpp v21.01.0-1~gfa065f96d built by root on ubuntu20-04 at
> 2021-02-24T09:00:32
>
> vpp# sh cpu
> Model name:               Intel(R) Xeon(R) Silver 4208 CPU @ 2.10GHz
> Microarch model (family): [0x6] Skylake ([0x55] Skylake X/SP) stepping 0x7
> Flags:                    sse3 pclmulqdq ssse3 sse41 sse42 avx rdrand avx2
> pqm pqe avx512f rdseed aes avx512_vnni invariant_tsc
> Base frequency:           2.09 GHz
> vpp#
>
> vpp# sh thread
> ID     Name                Type        LWP     Sched Policy (Priority)
> lcore  Core   Socket State
> 0      vpp_main                        4230    other (0)
> 1      7      0
> 1      vpp_wk_0            workers     4243    other (0)
> 2      1      0
> 2      vpp_wk_1            workers     4244    other (0)
> 3      6      0
> vpp#
>
> corresponding classify table : classify table mask l3 ip4 src miss-next
> drop memory-size 800M
>
> Is this behavior expected? Can some thing be done to achieve performance
> similar to single threaded VPP while running VPP with multiple threads?
>
> X.
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18823): https://lists.fd.io/g/vpp-dev/message/18823
Mute This Topic: https://lists.fd.io/mt/80903834/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to