Adjusting Cloud Foundry application memory for build process only
search cancel

Adjusting Cloud Foundry application memory for build process only

book

Article ID: 449464

calendar_today

Updated On:

Products

VMware Tanzu Platform Core

Issue/Introduction

Developer needs to increase memory limits specifically to pass a build process, but once deployed, the running application consumes significantly less memory.

High runtime memory limits are being set solely to accommodate the staging phase, leading to inefficient resource allocation.

Environment

Tanzu Elastic Application Runtime

Cloud Foundry CLI (CF)

Cause

The Cloud Foundry CLI (cf push) does not currently provide a flag or manifest option to independently tune staging_memory_in_mb. This is a product limitation of the CLI.

Resolution

The API contains a staging_memory_in_mb setting, however there is no flag or manifest option to tune this setting as part of CF CLI (for pushing an application). Therefore staging memory cannot currently be tuned as part of a CF push.
 
The only option at moment is to manually execute build (for example via a curl operation):
  1. Review the Cloud Foundry Build API documentation.
  2. Use the Build API to manually create a build with the desiredstaging_memory_in_mb value.
  3. Note that this process is typically invoked automatically by the CLI, and manual invocation is a workaround.