What are GB-Hrs for Serverless Function Execution?

Serverless Function Execution on Vercel is measured using a metric called GB-Hrs. GB-Hrs is the duration (Hours) your Serverless Function runs for, multiplied by the amount of memory (GB) allocated. The more memory you specify, or the longer your Serverless Function runs, the more GB-Hrs you will consume.

By default, Serverless Functions are allocated 1769 MB of memory, but can be configured to use more.

Serverless Function Execution Example

In this example, we will allocate 1769 MB of memory and execute it 1 million times at a 1-second duration:

Total Seconds: 1M * (1s) = 1,000,000 Seconds

Total GB-Seconds: 1769/1024 GB * 1,000,000 Seconds = 1,727,539.06 GB-Seconds

Total GB-Hrs: 1,727,539.06 GB-Seconds / 3600 = 479.87 GB-Hrs

The total Serverless Function Execution is 479.87 GB-Hrs.

Couldn't find the guide you need?