是否可以提高App Services中的内存利用率 [英] Can the memory utilisation in App Services be improved

查看:50
本文介绍了是否可以提高App Services中的内存利用率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在B1服务计划中,我在Azure的App Service计划中运行着一个相当简单的Web应用程序.该计划将提供1个CPU和1.75GB的RAM.

I have a fairly simple web application running in an App Service plan in Azure, in a B1 service plan. This plan provides for 1 CPU and 1.75GB of RAM.

CPU使用率永远不会超过5%,内存使用率永远不会低于52%.

The CPU usage never goes above about 5%, and the memory usage is never below 52%.

我确实停止了计划中运行的唯一站点,并且内存使用量丝毫没有下降.我创建了一个新的App Service计划,并将其运行一天,并且在这段时间内最小内存使用率为50%,其中没有运行任何应用程序.

I did stop the only site running in the plan and the memory usage didn't go down at all. I created a new App Service plan and left it run for a day, and the minimum memory usage was 50% over that time, with no apps running in it.

我知道造成这种情况的原因很可能是操作系统和在操作系统上运行的服务,但获得50%的RAM却很令人沮丧-我的应用程序会随着时间的增长而增长.

I know that the reason for this is likely the OS and the services running on the OS, but it's very frustrating getting 50% of the ram that I'm paying for - my app is going to grow over time.

我可以对计划本身做些什么以降低内存消耗吗?

Are there any things I can do to the plan itself, to lower the memory consumption?

关于该应用程序,除了禁用我不需要的功能(如Python和PHP)并将该应用程序设置为32位之外,还有其他选项吗?

With regards to the app, other than disabling features I don't need (like Python and PHP), and setting the app to be 32 bit, are there options there?

推荐答案

这就是这些服务的工作方式.50%的用户将用于运行操作系统(可能已经对其进行了很好的调整,以使其运行得尽可能少).值得一提的是,扩大规模时,这个数字不会保持在50%.如果我们按照基础设施"占用900 mb的原则进行工作,那么在您扩大规模时,该数字很可能将保持不变.因此,将3.5gb型号提高一倍将意味着该操作系统占用了您25%的可用内存.

That's just how these services work. The 50% is going towards running the operating system (which is probably already fairly well tuned to run as little as possible). It's probably worth mentioning that this number won't remain at 50% when you scale up. If we work on the principle that 900mb is being taken up by "infrastructure", then that number will most likely remain constant when you scale up. So doubling up to the 3.5gb model will mean that the OS is taking up 25% of your available memory.

如果您不访问* .scm.azurewebsites.net网站,那么它将不会占用任何内存(因为不会被加载),并且您正在与其他应用共享应用服务计划您自己禁用然后禁用始终在线"将意味着您的应用程序如果不被使用将不会占用任何内存.

If you don't access the *.scm.azurewebsites.net site then it won't take up any memory (as it won't be loaded), and if you're sharing the app service plan with other apps of your own then disabling "Always On" will mean that your apps won't take up any memory if they're not being used.

我知道的唯一不包含操作系统的可用内存是 AWS Lambda .

The only services that I'm aware of that don't include the OS in the available memory that you can use are Azure Functions / AWS Lambda.

这篇关于是否可以提高App Services中的内存利用率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆