cancel
Showing results for 
Search instead for 
Did you mean: 

disk-quota & memory in Cloud Foundry MTA descriptor

kammaje_cis
Active Contributor

I am creating an MTA app for deployment to SCP Cloud Foundry. How do I decide what is the optimal values for disk-quota & memory for various modules in my application? There might be some experimentation but what are the guidelines and how to optimize this so as to not reserve too many resources?

WouterLemaire
Active Contributor
0 Kudos

I think this can variate depending on the use case and how large the project is. Anyway, some guidelines would be helpful!

kammaje_cis
Active Contributor
0 Kudos

Yeah, with a productive CF, we need to optimize the resource allocation. I could not find any kind of documentation on this.

Accepted Solutions (1)

Accepted Solutions (1)

mariusobert
Developer Advocate
Developer Advocate

This is a good question, but as Wouter already mentioned, it heavily depends on your scenario.

The Application Router has a sizing guide in the documentation that can help you a little bit. Obviously these results will be different for non-AppRouter scenarios like CAP.

For this, I would recommend to initially allocate the 3-4x the needed resources in the beginning and to observe how much resources are actually consumed. You can do this with the SAP Cloud Platform Cockpit or the with CLI (cf app <appname> or cf top <appname>). Later, when you have a feeling how much resources you need, you can scale down/up with the "cf scale" command.

An even more sophisticated approach would also use the SAP Web Analytics service to track how many users use your app for how long. Based on these numbers you could check if you need dynamic scaling. In this case, you could use the Application Autoscaler Service to define rules when SAP Cloud Platform should add and remove new instances based on the consumption.

kammaje_cis
Active Contributor

Thanks, Marius for pointing to useful documentation.

When I ran cf app my_timesheet, I got the below results.

My app is of around 1 MB of size. I have 2GB of application runtime entitlement.

In the mta.yaml I had reserved 265MB for this app. You can see it under memory above. I found out that 256MB gets deducted from my runtime quota. So memory reserve needs to be carefully chosen within the mta file. Once service is deployed, you can change the reserved memory from the Cloud Platform Cockpit as well.

Answers (0)