Hi @Manash-2022 ,
Thanks for reaching out to Q&A forum.
From the scenario and your questions, I see that you need clarity on the memory usage of Function app in consumption and dedicated app service plan SKU. I will answer your questions in order
(1) In the case of loading 2 files into memory when function loads and using HTTP as a trigger, when does Azure function scale to create a new 2nd instance for the function app?
The scaling of the function app (serverless) is decided by the scale controller. It looks into multiple factors such as the incoming load (number of requests), CPU/memory utilization of the existing instance etc. So it is not just the memory usage of the function app. Only when all the factors are causing the instance to be exhausted, the scale controller votes to add a new instance.
(2) By default, does the Function app uses the resource of the app service plan might it be consumption (with 1.5GB memory limit) or App Service plan(8GB in my case with P1V3 VM)?
Yes. The Function app uses the resource of the App service plan depending on the SKU
(3) How do I differentiate between the memory usage in the above 3 images?
First image is the memory working set. The working set is the total amount of memory used by the process (w3wp.exe) which is private and unique to the process as well as shared memory
used by the process such as shared libraries.
Second image is the commited memory. It is the amount of virtual memory which is reserved, or committed, for the process. So it is not the utilization. Virtual memory come into picture when
you run out of physical memory and another process asks for more memory the operating system needs a mechanism to ensure the requirements can be met.
Third image is the File system storage . Please refer the below article for file system storage
https://github.com/projectkudu/kudu/wiki/Understanding-the-Azure-App-Service-file-system
Hope this helps! Feel free to reach out to me if you have any questions or concerns.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.