The memory configuration of a function determines how much memory and CPU a function can use while executing. By default, on Pro and Enterprise, functions execute with 2 GB (1 vCPU) of memory. On Hobby, they will always execute with 2 GB (1 vCPU). You can change the default memory size for all functions in a project.
You should consider the following points when changing the memory size of your functions:
Those on the Pro or Enterprise plans can configure the default memory size for all functions in a project.
To change the default function memory size:
You cannot set your memory size using vercel.json
. If you try to do so, you will receive a warning at build time. Only Pro and Enterprise users can set the default memory size in the dashboard. Hobby users will always use the default memory size of 1 GB (1 vCPU).
The memory size you select will also determine the CPU allocated to your Vercel Functions. The following table shows the memory and CPU allocation for each type.
With fluid compute enabled on Pro and Enterprise plans, the default memory size is 2 GB (1 vCPU) and can be upgraded to 4 GB / 2 vCPUs, for Hobby users, Vercel manages the CPU with a minimum of 1 vCPU.
Type Memory / CPU Use StandardDefault 2 GB / 1 vCPU Predictable performance for production workloads. Default for fluid compute. Performance 4 GB / 2 vCPUs Increased performance for latency-sensitive applications and SSR workloads.Users on the Hobby plan can only use the default memory size of 2 GB (1 vCPU). Hobby users cannot configure this size. If you are on the Hobby plan, and have enabled fluid compute, the memory size will be managed by Vercel with a minimum of 1 vCPU.
Project created before 2019-11-08 have the default function memory size set to 1024 MB/0.6 vCPU for Hobby plan, and 3008 MB/1.67 vCPU for Pro and Enterprise plan. Although the dashboard may not have any memory size option selected by default for those projects, you can start using the new memory size options by selecting your preferred memory size in the dashboard.
To check the memory size of your functions in the dashboard, follow these steps:
To learn more about the maximum size of your function's memory, see Max memory size.
While memory / CPU size is not an explicitly billed metric, it is fundamental in how the billed metric of Function Duration is calculated.
Legacy Billing Model: This describes the legacy Function duration billing model based on wall-clock time. For new projects, we recommend Fluid Compute which bills separately for active CPU time and provisioned memory time for more cost-effective and transparent pricing.
You are charged based on the duration your Vercel functions have run. This is sometimes called "wall-clock time", which refers to the actual time elapsed during a process, similar to how you would measure time passing on a wall clock. It includes all time spent from start to finish of the process, regardless of whether that time was actively used for processing or spent waiting for a streamed response. Function Duration is calculated in GB-Hours, which is the memory allocated for each Function in GB x the time in hours they were running.
For example, if a function has 1.7 GB (1769 MB) of memory and is executed 1 million times at a 1-second duration:
To see your current usage, navigate to the Usage tab on your team's Dashboard and go to Serverless Functions > Duration. You can use the Ratio option to see the total amount of execution time across all projects within your team, including the completions, errors, and timeouts.
You can also view Invocations to see the number of times your Functions have been invoked. To learn more about the cost of Vercel Functions, see Vercel Function Pricing.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4