3

I am looking into different FaaS providers and am interested how much disk space I have per function. A function in AWS Lambda has 512 MB of disk space available (see here) and Azure functions have up to 1000 GB of disk space, depending on the pricing model (see here).

How much does a GCP Function have?

When searching the documentation, I could only find that functions do have disk storage, but not how much (see here).

sdcbr
  • 7,021
  • 3
  • 27
  • 44
User12547645
  • 6,955
  • 3
  • 38
  • 69

3 Answers3

3

Maybe a better documentation redirection is (as per 2021-10-14):

The filesystem itself is entirely writeable (except for files used by the underlying OS) and is stored within the Cloud Functions instance's memory.

https://cloud.google.com/functions/docs/concepts/exec#file_system

So as per Chris' response/comments,

Cloud Function doesn't have a 'disk space'

Or to be more accurate, the disk space IS the memory space.

Tony
  • 41
  • 3
3

Currently cloud functions can be configured for 8GB of memory, which as correctly noted includes the 'filesystem'

E_net4
  • 27,810
  • 13
  • 101
  • 139
labroid
  • 452
  • 4
  • 14
1

A google Cloud function can have between 128 MiB and 2 GiB of memmory.

enter image description here

You can find here the quotas for Cloud Functions

Community
  • 1
  • 1
Chris32
  • 4,716
  • 2
  • 18
  • 30
  • 1
    Correct. I am not talking about memory. I am talking about available disk space. Do you know how much disk space is available? – User12547645 May 28 '20 at 13:55
  • 1
    Cloud Function doesn't have a 'disk space' since the instances are preemtibles. The all your code, library and other stuff will be loaded and procesed on memory, you can use Cloud Storage to store and persist more data if you need so. – Chris32 May 28 '20 at 14:24
  • I know that Cloud Functions only have ephemeral storage. That does not mean that they don't have a storage hierarchy, though. CFs are also just virtual compute units. Why not mount a disk? – User12547645 May 28 '20 at 15:23
  • [From here](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html): Each execution context provides 512 MB of additional disk space in the **/tmp** directory. The directory content remains when the execution context is frozen, providing transient cache that can be used for multiple invocations. You can add extra code to check if the cache has the data that you stored. For information on deployment limits – User12547645 May 28 '20 at 15:27
  • I don't know the architectural desitions of Google behind not providing a storage disk to their Cloud Functions but that doesn't change the fact that you can only use the provided memory as temporal storage. Also, refering to AWS documentation is completly unacurate because is a completly different sistem to Google Cloud Platform – Chris32 May 28 '20 at 15:48
  • 1
    Also, I don't see any good reason for anyone to downvote this since it's a legit question, upvoting you ;-D – Chris32 May 28 '20 at 15:49
  • Thanks :D True. Different system. Why could disk be helpful: Data processing, spill on (temporary) disk if you run out of main memory. – User12547645 May 28 '20 at 16:05
  • @Chris32, it isn't a *legit question* as you say. It's not about programming. It's about the use of a service, or in this specific case, it's about finding info in the documentation, and it's off-topic on Stack Overflow. You should avoid answering that kind of questions. Instead you can vote to close the question and if you like, direct OP to the documentation in a comment. – MrUpsidown Jul 04 '20 at 16:41
  • @MrUpsidown I disagree. The question seems ok to me and I think that the answer may help others so I will answer it since the ultimate purpose of this is to help others if you can. Feel free to do the needful if you feel so and downvote, report or flag it... – Chris32 Jul 04 '20 at 16:53
  • *The question seems ok to me* - well, that's where we disagree. To me it is a [customer support](https://meta.stackoverflow.com/questions/255745/why-cant-i-ask-customer-service-related-questions) question. Also while your answer might be correct now, it might be wrong in 2 days if the numbers change and/or if your link stops working making both the question and your answer kind of useless. That might explain the down-votes now, and might trigger more in the future if your answer becomes incorrect. – MrUpsidown Jul 04 '20 at 18:09