ligato / vpp-agent

⚡️ Control plane management agent for FD.io's VPP
https://docs.ligato.io/
Apache License 2.0
247 stars 127 forks source link

Question: why telementry plugin use api sock to dump memory telemetry rather than stats.sock? #1908

Open scottlx opened 1 year ago

scottlx commented 1 year ago

vpp has stats.sock for system, memory stats. But telemetry plugin use api.sock with vpe to dump memory by CLI. Because vpp api node is single thread and will not put msg into channel like what govpp does. This could cause reply timeout when govpp sends msg into api.sock in a high freqeuncy, which influnces other api request.

ondrej-fabry commented 1 year ago

Hello @scottlx,

Thanks for the issue report.

This is probably due legacy implementation of Telemetry plugin. At the time when the plugin was implemented, it was not possible to retrieve memory statistics via VPP Stats API (stats.sock).

I will add this to a backlog, however you're welcome to open a PR to fix this if that is something you would be open to do.

scottlx commented 1 year ago

Thanks for your reply. It makes sense.

And I guess another reason might be that vpp stats api does not provide detailed metrics than cli does. For example, "show memory main-heap verbose" shows memory usage per thread. But stats api only shows global memory usages. I am also confused why api, cli, and stats in vpp are not consist with each other.

Now I am working on this issue both on vpp side and agent side.