cloudflare / cloudflare-gcp

Google Cloud Function to push json files from GC Storage to Big Query
Apache License 2.0
84 stars 49 forks source link

memory allocation cloud function #53

Closed eraac closed 4 years ago

eraac commented 4 years ago

Does there are any reason to set 1024MB of memory for the cloud function? On our side the function never consume more than 80MB image

Reducing the memory allocation can reduce cost, actually 1024MB is seven time expensive than 128MB. So we need to know if we can safely reduce the memory allocation

shagamemnon commented 4 years ago

You can safely reduce memory yes. 1024MB is set because users often use this with Pub/Sub, which requires log parsing and thus a larger heap