Elias,

> I think you are right about the stop-world way it works.
> 
> We have seen a performance impact, but that was for a command that was
> quite slow, listing something with many lines of output (the "show
> nat44 sessions" command). So then the worker threads were stopped
> during that whole operation and we saw some packet drops each time.
> Later we were able to extract the info we needed in other ways (like
> getting number of sessions directly as a single number per thread via
> the python API instead of fetching a large output and counting lines in
> that), so we could avoid that performance problem.

The correct answer is of course "it depends".
Non thread safe API calls will block the workers.
Thread-safe ones, may incur locking that affects the workers.
The dump/detail mechanism is not suitable to dump large data structures.
Those typically would block the main thread for too long a time.
In general the expectation is that the control plane should know what it has 
confiured VPP with, so there shouldn't be a need to query VPP for that 
information.

For frequently changing data structures like the NAT binding table, it's a 
little trickier.
The NAT binding table could have several hundred million entries with millions 
of adds/deletes a second.
Neither the stats segment or the API is useful for that. Although you could 
imagine doing something with snap-shots.
For data structures like that there is ipfix or even syslog.


> For small things like checking the values of some counters, we have not
> seen any performance impact. But then we only did those calls once
> every 30 seconds or so. If you do it very often, like many times times
> per second, maybe there could be a performance impact also for small
> things. I suppose you could test it by gradually increasing the
> frequency of your API calls and seeing when drops start to happen.

Checking counters values in the stats segment has _no_ impact on VPP.
VPP writes those counters regardless of reader frequency.

Best regards,
Ole
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15740): https://lists.fd.io/g/vpp-dev/message/15740
Mute This Topic: https://lists.fd.io/mt/71882379/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