Pivotal Knowledge Base

Follow

PCF Autoscaler: Advisory for scaling apps based on CPU utilization

Environment

Pivotal Cloud Foundry (PCF) Autoscaler

Purpose

PCF Autoscaler may not reliably scale apps when using scaling rules based on CPU utilization.

Cause

Application CPU utilization data may vary greatly based on # of CPU cores on Diego cells and application density. 

Advisory

The CPU behavior in ERT is effected by both # of cores on the host Cell and app density on the host cell. Because the CPU can be represented in ERT as a value greater than 100%, and is dependent on data the user may not be able to access, we can only advise users to take one of two approaches.

1. If the app can be characterized by other metrics (HTTP currently) then use other metrics. Autoscaler recently added HTTP latency and throughput.

2. If CPU is the only indicator of load on a particular app, then the user will need to profile the app in the target environment to understand the CPU metric behavior in that specific environment. Also, if users do know the underlying architecture of the Cells (cores), those values can be used to calculate a valid CPU expectation. This is still susceptible to wide variations in the metrics.

We do not recommend approach #2.

Because these realities present a problem to users and to other components (autoscaler), there is an initiative to get more valuable and reliable CPU metrics into the platform.
As the values are calculated and produced by the Garden container backend, there is ongoing effort to improve the reliability and usefulness of this metric provided by Garden.

In the meantime, autoscaler did have a bug in the GUI in which the user could not enter a value of 99%. This has been fixed in recent releases.

The API has supported these larger values without any issues. The resulting behavior is deterministic from an autoscaling perspective but is still susceptible to the CPU value variations mentioned earlier.

Additional Information

Reference:

https://docs.run.pivotal.io/appsman-services/autoscaler/using-autoscaler.html

http://docs.pivotal.io/pivotalcf/1-9/appsman-services/autoscaler/api/

 

Comments

Powered by Zendesk