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

查看:39
本文介绍了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天全站免登陆