Google Cloud Run内存限制是否适用于容器大小? [英] Does Google Cloud Run memory limit apply to the container size?

查看:65
本文介绍了Google Cloud Run内存限制是否适用于容器大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关文档中的云运行的内存使用情况( https://cloud.google.com/run/docs/configuring/memory-limits )

For cloud run's memory usage from the docs (https://cloud.google.com/run/docs/configuring/memory-limits)

超出其允许的内存限制的Cloud Run应用程序将终止.

Cloud Run applications that exceed their allowed memory limit are terminated.

配置内存限制设置时,您指定的内存分配用于:

When you configure memory limit settings, the memory allocation you are specifying is used for:

  • 运营您的服务
  • 将文件写入磁盘
  • 在容器中运行二进制文件或其他进程,例如nginx Web服务器.

容器的大小是否计入操作您的服务"?并计入内存限制?

Does the size of the container count towards "operating your service" and counts towards the memory limit?

我们打算使用已经接近内存限制的图像,因此我们想知道服务本身是否只能访问从限制中减去容器大小后剩下的内容

We're intending to use images that could already approach the memory limit, so we would like to know if the service itself will only have access to what is left after subtracting container size from the limit

推荐答案

您部署到Cloud Run的容器映像的大小不计入内存限制.例如,如果您的容器映像是3 GiB,则仍可以在256 MiB内存环境中运行.

Size of the container image you deploy to Cloud Run does not count towards the memory limit. For example, if your container image is 3 GiB, you can still run on a 256 MiB memory environment.

新文件写入本地文件系统,或者(显然)在您的应用程序内分配更多内存将计入容器的内存使用量.(也许也很明显,但是值得一提),操作系统会将容器的可执行入口点加载"到内存中(执行).这也将计入可用内存.

Writing new files to local filesystem, or (obviously) allocating more memory within your app will count towards the memory usage of your container. (Perhaps also obvious, but worth mentioning) the operating system will "load" your container's entrypoint executable to memory (well, to execute it). That will count towards the available memory as well.

这篇关于Google Cloud Run内存限制是否适用于容器大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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