I have an 8 core centos machine. I am running a docker on this machine which runs a controller which manages some of our hardware devices ( 400 to 600 in number). Inside the docker, I have confd running which basically configures these devices and also retrieves operational data for all of these. When I execute a show command( operational data fetch ) or do some maapi calls from an application within the docker, the CPU spikes upto 100% on one core.
Two things I would want to understand:
Why is the CPU clogging 100% for a simple ? or from the cli command?
ConfD will of course use however much “CPU percentage” the OS allows it to use.
Whether the total amount of CPU time consumed is reasonable for the task at hand is another question, and the answer depends on the exact task and the power of the CPU, neither of which was specified. (And even when they are specified, a significant investigation effort may be needed to give an answer).
See the --smp option of ConfD and Section: 27.3 of the user guide (Installing ConfD on a target system).
However running on multiple cores doesn’t automatically parallelize everything, and specifically a single operation in a single ConfD CLI session is unlikely to benefit. There is
also an overhead penalty both in CPU time and memory for running multicore. But if you e.g. are running multiple cpu-intensive CLI sessions it should/may help.