Azure 函数执行上下文中有多少本地磁盘可用 [英] how much local disk is available in an Azure Function execution context

查看:11
本文介绍了Azure 函数执行上下文中有多少本地磁盘可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有多少本地磁盘可用于 Azure 函数的单次执行.

How much LOCAL DISK is available to a single execution of an Azure Function.

根据这个问题https://github.com/Azure/Azure-Functions/issues/179,位置 D:local 和 HOME 环境变量应该是可写的.

According to this issue https://github.com/Azure/Azure-Functions/issues/179, the locations D:local and the HOME environment variable should be writable.

我想知道每个函数有多少可用空间,或者对于临时文件使用基于 System.IO 的文件写入的推荐策略是什么.

I want to know how much space is available for each function to work with, or what the recommended strategy for using System.IO based file writes are for temporary files.

推荐答案

刚刚在我的 Function App 上运行了这段代码:

Just ran this code on my Function App:

foreach (DriveInfo drive in DriveInfo.GetDrives().Where(d => d.IsReady))
{
    log.Info($"{drive.Name}: {drive.TotalFreeSpace / 1024 / 1024} MB");
}

得到了

C:: 457665 MB
D:: 1511 MB

我想没有文件会告诉你确切的数字,但你可以用我的作为估计.我正在执行消费计划.

I guess no document will tell you the exact number, but you can use mine as estimate. I'm running on Consumption plan.

这篇关于Azure 函数执行上下文中有多少本地磁盘可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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