[vpp-dev] VPP host stack proxy #hoststack #vpp-hoststack
Hi Florin, Thanks for your timely reply. > > I’m doing testing with things like envoy and at 200 CPS cli is not > affected. Can be an issue related to configuration or maybe hardware. This is really caused by my environment. I did this test on the local virtual machine. When I test with a real physical environment and a Spirent tester,Low speed CPS, i.e. 1K req/s, will not affect cli. But when the CPS reaches 3 req/s, the VPP cli command line becomes very stuck and cannot execute commands normally. My test machine is Intel (R) Xeon (R) CPU e5-2670, there are 24 cores. > > top - 14:44:52 up 3:06, 4 users, load average: 5.65, 4.96, 3.95 > Tasks: 311 total, 6 running, 305 sleeping, 0 stopped, 0 zombie > %Cpu0 : 0.0 us, 0.0 sy, 0.0 ni, 96.2 id, 0.0 wa, 0.0 hi, 3.8 si, > 0.0 st > %Cpu1 : 99.7 us, 0.3 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu2 : 99.7 us, 0.3 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu3 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu4 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu5 : 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu6 : 79.1 us, 20.9 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu7 : 75.8 us, 24.2 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu8 : 75.7 us, 24.3 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu9 : 77.2 us, 22.8 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu10 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu11 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu12 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu13 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu14 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu15 : 0.7 us, 0.0 sy, 0.0 ni, 99.3 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu16 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu17 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu18 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu19 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu20 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu21 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu22 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > %Cpu23 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st cpu1 is vpp main core,and cpu2 is vpp worker.cpu6-9 is nginx worker. > > Pressed send a bit too soon. I also tried a simple proxy scenario locally > with -c 500 and envoy and got about 490-500 CPS. Then did the same with -c > 1000 and got close to 1k req/s. > > I’m guessing performance is capped by how fast we manage to establish a > connection as the proxy will introduce a decent amount of latency and ab > needs to wait until the requests in flight are answered. > > Regards, > Florin > > >> On Dec 23, 2021, at 8:57 PM, Florin Coras < fcoras.li...@gmail.com > wrote: >> >> Hi Jie, >> >> Inline. >> >> >> >>> On Dec 23, 2021, at 6:34 PM, deng...@webray.com.cn wrote: >>> Hi Florin, >>> Thanks for your reply! My intention was to ask you on vpp-dev, but because >>> I am not familiar with vpp-dev, replay was selected as private email in >>> this conversation ( >>> https://lists.fd.io/g/vpp-dev/topic/81698902?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Arelevance%2C%2C%23hoststack%2C20%2C2%2C0%2C81698902%2Cct%3D1&ct=1 >>> ). >>> >> >> >> Have you registered with the mailing list? Maybe that’s why you’re hitting >> issues. >> >> >>> The VPP version I use is 21.10. When the RPS of HTTP is more than 200, the >>> utilization rate of the main core will be very high. I think active opens >>> is in the main thread, and each version should have this issues. >>> >> >> >> I’m doing testing with things like envoy and at 200 CPS cli is not >> affected. Can be an issue related to configuration or maybe hardware. >> >> >>> In our usage scenario (using VPP's host stack to speed up nginx reverse >>> proxy), since TCP active opens is generated by main thread, there will be >>> some problems under a large number of HTTP requests. >>> * The CPU utilization of main core is close to 100% , which will cause the >>> execution of CLI commands to be very slow. >>> >>> >> >> It’s 100% because main thread switches to polling mode. It’s not that all >> cpu is consumed just that main thread is not sleeping. >> >>> * Because active opens is in the main thread and barrier sync, the >>> scalability of multi-core performance is not very good. >>> >>> >> >> Connects do indeed rely on barrier syncs but they are paced so they should >> no
[vpp-dev] Use of /etc/sysctl.d/80-vpp.conf
Hello Mates, May I know what is the use of /etc/sysctl.d/80-vpp.conf ? How to use it or is that not necessary? /Akash -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20665): https://lists.fd.io/g/vpp-dev/message/20665 Mute This Topic: https://lists.fd.io/mt/87932746/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] How did use JAVA API for VPP version 2106
Hi, ALL I need a Java APIs for VPP to configure the interface an route. My Vpp version is 2106 I found the JVPP was not update since three years ago. I think JVPP not support the new VPP version Does anyone know the right method. Thanks Guangming -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20664): https://lists.fd.io/g/vpp-dev/message/20664 Mute This Topic: https://lists.fd.io/mt/87930886/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] vlib_frame_t aux data
I just submitted patch which cleans vlib_frame_t allocation code and adds support for aux data. https://gerrit.fd.io/r/c/vpp/+/34798 Example use case is when node passes array of sw_if_index to next node, so next node doesn’t need to do expensive parsing of buffer metadata. It is as simple as: typedef struct { u32 sw_if_index; u32 foo; } my_frame_aux_data_t; VLIB_REGISTER_NODE (my_node) = { .vector_size = sizeof (u32), .aux_size = sizeof (my_frame_aux_data_t), }; And the inside the node function: my_frame_aux_data_t *ad = vlib_frame_aux_args (frame); Sending node can pass parameters with: vlib_next_frame_t *nf; vlib_frame_t *f; nf = vlib_node_runtime_get_next_frame (vm, node, next_index); f = vlib_get_frame (vm, nf->frame); aux = vlib_frame_aux_args (f); Please let me know if any feedback... — Damjan -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20663): https://lists.fd.io/g/vpp-dev/message/20663 Mute This Topic: https://lists.fd.io/mt/87924883/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] searching for all routes that point to an attached next-hop neighbor #routing
posting again because not sure message went through: Thanks for the quick reply Stanislav, I'm inserting hooks into the VPP control plane in order to offload certain information to an external hardware dataplane. In the case of route resolutions, I want to be able to say : "Ok, I got the arp reponse for 10.0.0.2, let's get all the routes that point to this nexthop" so I can send them to the hardware. For now, routes are added using vpp cli, but this logic should hold regardless of the route source (BGP etc). -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20662): https://lists.fd.io/g/vpp-dev/message/20662 Mute This Topic: https://lists.fd.io/mt/87917518/21656 Mute #routing:https://lists.fd.io/g/vpp-dev/mutehashtag/routing Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] searching for all routes that point to an attached next-hop neighbor #routing
Hi David, I'll answer from my perspective (maybe not 100% correct). Both your commands will create 2 paths with attached nexthop. It will source the fib path for 10.0.0.2/32 based on the "connected" path for 10.0.0.0/24 (which is a glean path on the interface GigabitEthernet2/0/1). You'd see it as "arp-ipv4: via 10.0.0.2 GigabitEthernet2/0/1". So, when the first packet would come to dst in the 100.64.10.0/23, the arp request will be sent automatically. After the arp response is processed, an adj-fib path for 10.0.0.2/32 (with l2 headers) will be added. And there's no need to iterate over all the routes with such nexthop. I didn't get your use case, but I can assume one thing. In case your control plane is responsible for adding such routes, you need only to subscribe to neighbours events (want_ip_neighbor_events for the specific ip address and/or interface). Then you can lookup routes in CP with such nexthop and do whatever you want with those routes. In case your CP isn't responsible for that, you need to dump all the routes from time to time and do the same thing. If you can tell more about your use-case there might be more bright ideas. On Thu, 23 Dec 2021 at 14:13, David Gohberg wrote: > Hello, > > From reading the routing data model: > > https://fdio-vpp.readthedocs.io/en/latest/gettingstarted/developers/fib20/routes.html#id2 > I understand that when I add a static route (using the "ip route add" > command) to an attached next hop, VPP will resolve that > route, which is triggered (in my case of plain ol' routing) by a > successful ARP learning event. What I want is to perform > some logic on each of the routes that their attached next-hop is a > recently learned neighbor. > > Taking the example from the doc: if I use > ip route add table 1 64.10.1.0/24 10.0.0.2 GigabitEthernet2/0/1 > ip route add table 1 64.10.2.0/24 10.0.0.2 GigabitEthernet2/0/1 > then upon learning the MAC of 10.0.0.2 neighbor, > I want to be able to programmatically fetch the 64.10.1.0/24 and > 64.10.2.0/24 prefixes in that context of neighbor resolution. > > I've traced down the neighbor learning logic to `ip_neighbor_add` function > in `vnet/ip-neighbor/` but I couldn't figure out > where VPP performs the route resolution following a neighbor learning > event. > > If I understand the model correctly, a new neighbor IP and MAC triggers a > change to the adjacency table. > In order to fetch the matching prefixes, I need to be able to iterate over > entries of fib_entry_t , for each entry checking the fib_path_t it has, and > whether the path's ip_adjancency_t is matching the IP and MAC of the > recently learned neighbor. > > Is my perception correct? > > Thanks, > David > > > -- Best regards Stanislav Zaikin -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20661): https://lists.fd.io/g/vpp-dev/message/20661 Mute This Topic: https://lists.fd.io/mt/87917518/21656 Mute #routing:https://lists.fd.io/g/vpp-dev/mutehashtag/routing Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] searching for all routes that point to an attached next-hop neighbor #routing
Hello, >From reading the routing data model: https://fdio-vpp.readthedocs.io/en/latest/gettingstarted/developers/fib20/routes.html#id2 I understand that when I add a static route (using the "ip route add" command) to an attached next hop, VPP will resolve that route, which is triggered (in my case of plain ol' routing) by a successful ARP learning event. What I want is to perform some logic on each of the routes that their attached next-hop is a recently learned neighbor. Taking the example from the doc: if I use ip route add table 1 64.10.1.0/24 10.0.0.2 GigabitEthernet2/0/1 ip route add table 1 64.10.2.0/24 10.0.0.2 GigabitEthernet2/0/1 then upon learning the MAC of 10.0.0.2 neighbor, I want to be able to programmatically fetch the 64.10.1.0/24 and 64.10.2.0/24 prefixes in that context of neighbor resolution. I've traced down the neighbor learning logic to `ip_neighbor_add` function in `vnet/ip-neighbor/` but I couldn't figure out where VPP performs the route resolution following a neighbor learning event. If I understand the model correctly, a new neighbor IP and MAC triggers a change to the adjacency table. In order to fetch the matching prefixes, I need to be able to iterate over entries of fib_entry_t , for each entry checking the fib_path_t it has, and whether the path's ip_adjancency_t is matching the IP and MAC of the recently learned neighbor. Is my perception correct? Thanks, David -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20660): https://lists.fd.io/g/vpp-dev/message/20660 Mute This Topic: https://lists.fd.io/mt/87917518/21656 Mute #routing:https://lists.fd.io/g/vpp-dev/mutehashtag/routing Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-