Skip to content

Formulas saw a 2.5x increase in CPU usage in rc2201 #1341

@llucax

Description

@llucax

What happened?

After the upgrade to the microgrid API client v0.18 we are seeing formulas being much more CPU intensive. Compared to the rc210x series, it went from 18% CPU usage to 50% CPU usage in some site.

What did you expect instead?

No major increase in CPU usage.

Affected version(s)

v1.0.0-rc2201+

Affected part(s)

Microgrid (API, component graph, etc.) (part:microgrid)

Extra information

The only thing that changed in that version was the upgrade of the microgrid API client. There are many factors that could affect this.

  • The new client might take more effort to parse streamed data, as data now comes as a list of metrics, and we need to iterate over them.
  • We probably have more wrappers in the new version, like every metric is wrapped, before they were just a float.
  • The SDK is doing extra wrapping to wrap the data to the old ComponentData structures, and then these data structures are decomposed again.

We need to remove the compatibility layer anyway, so we could just start with that and measure the performance impact, and then only look at other causes if there is still a considerable difference with the rc210x series.

Metadata

Metadata

Assignees

Labels

part:microgridAffects the interactions with the microgridpriority:highAddress this as soon as possibletype:regressionSomething isn't working, but it was working before

Projects

Status

To do

Relationships

None yet

Development

No branches or pull requests

Issue actions