Microservice resources

Product/components used and version/fix level:

1018.0.281

Question related to a free trial, or to a production (customer) instance?

production

Hi all,

in our cumulocity.json (manifest file) I declare the resources like this:

"resources": {
    "cpu": "1",
    "memory": "1G"
},
"requestedResources":{
        "cpu": "100m",
        "memory": "128Mi"
},

In the dokumentation on page General aspects - Cumulocity IoT Guides


requestedResources should be the minimum resources what the microservice can consume. But with my test-microservice it consumes always the resource limits, although it only writes a few lines to the console every minute. What do I have to do, that a microservice consumes only minimum resources when it is in IDLE mode.

thx for help

Helmut

Hi Helmut,

The ‘requestedResources’ are the minimum resources necessary to start the microservice, but they have little to no impact on billing. When the microservice pod is started, it will request the amount of resources listed in the ‘resources’ manifest. In your case, that is 1 CPU, 1 GB RAM. Then, to begin running, it will check to ensure these resources are enough to cover the ‘requestedResources’ values.

To alter the billable amount, you should plan on reducing the ‘resources’ values for your microservice. Note that the ‘requestedResources’ and the ‘resources’ can be the same value, if necessary. Happy to chat more on this with you if needed!

Best,
Tal

1 Like