▲ Vercel Integration now GA - Create a database branch for every preview deployment, automatically.Learn here

Usage metrics

As described in How billing works, each of Neon's plans includes Storage, Compute, and Project usage allowances. The Launch and Scale plans permit extra usage.

This topic describes Storage, Compute, and Project usage metrics in more detail so that you can better manage your plan allowances and extra usage.

Storage

Storage is a combination of your data size plus the shared change history that is used to enable branching-related features like point-in-time restore, query testing, and reset from parent.

The following table outlines data storage allowances per month for each Neon plan.

PlanStorage
Free Tier512 MiB
Launch10 GiB
Scale50 GiB
EnterpriseLarger sizes

Extra storage is available with the Launch and Scale plans:

  • On the Launch plan, extra storage is billed for in units of 2 GiB at $3.5 each
  • On the Scale plan, extra storage is billed for in units of 10 GiB at $15 each

Storage details

Storage is the total volume of data and history stored in Neon, measured in gibibytes (GiB). It includes the following:

  • Data size

    The size of all databases in your Neon projects. You can think of this as a snapshot of your data at a point in time.

  • History

    Neon retains a history of changes for all branches to support point-in-time restore and branching.

    • Point-in-time restore is the ability to restore data to an earlier point in time. Neon retains a history of changes in the form of WAL records. You can configure the history retention period. See Point-in-time restore. WAL records that age out of the history retention period are evicted from storage and no longer count toward storage.

    • A branch is a virtual snapshot of your data at the point of branch creation combined with WAL records that capture the branch's data change history from that point forward. When a branch is first created, it adds no storage. No data changes have been introduced yet, and the branch's virtual snapshot still exists in the parent branch's history, which means that it shares this data in common with the parent branch. A branch begins adding to storage when data changes are introduced or when the branch's virtual snapshot falls out of the parent branch's history, in which case the branch's data is no longer shared in common. In other words, branches add storage when you modify data or allow the branch to age out of the parent branch's history.

      Database branches can also share a history. For example, two branches created from the same parent at or around the same time share a history, which avoids additional storage. The same is true for a branch created from another branch. Wherever possible, Neon minimizes storage through shared history. Additionally, to keep storage to a minimum, Neon takes a new branch snapshot if the amount of data changes grows to the point that a new snapshot consumes less storage than retained WAL records.

Storage is calculated in gibibytes (GiB), otherwise known as binary gigabytes. One gibibyte equals 230 or 1,073,741,824 bytes.

Compute

The following table outlines compute allowances per month for each Neon plan.

PlanCompute
Free TierAlways-available primary branch compute, 5 compute hours (20 active hours)/month on branch computes
Launch300 compute hours (1,200 active hours)/month
Scale750 compute hours (3,000 active hours)/month
EnterpriseCustom

Extra compute usage is available with the Launch and Scale plans. Extra compute usage is billed for at $0.16 per compute hour. For example, the Launch plan has an allowance of 300 compute hours included in the plan's monthly fee. If you use 100 additional compute hours over the monthly billing period, you are billed an extra $16 (100 x $0.16) for the month.

What are active hours and compute hours?

  • An active hour is a measure of the amount of time a compute is active. The time your compute is idle when suspended due to inactivity is not counted. In the table above, active hours are based on a 0.25 vCPU compute size.

  • A compute hour is one active hour for a compute with 1 vCPU. For a compute with .25 vCPU, it takes 4 active hours to use 1 compute hour. On the other hand, if your compute has 4 vCPUs, it takes only 15 minutes to use 1 compute hour.

  • Compute hours formula

    compute hours = compute size * active hours

How Neon compute features affect usage

Compute-hour usage in Neon is affected by autosuspend, autoscaling, and your minimum and maximum compute size configuration. With these features enabled, you can get a sense of how your compute usage might accrue in the following graph.

Compute metrics graph

You can see how compute size scales between your minimum and maximum CPU settings, increasing and decreasing compute usage: compute size never rises above your max level, and it never drops below your minimum setting. With autosuspend, no compute time at all accrues during inactive periods. For projects with inconsistent demand, this can save significant compute usage.

Compute usage details

Compute hour usage is calculated by multiplying compute size by active hours. Neon measures compute size at regular intervals and averages those values to calculate your compute hour usage.

Active hours is the amount of time that your computes have been active. This includes all computes in your Neon project but excludes time when computes are in an Idle state due to auto-suspension (scale-to-zero).

Compute size in Neon is measured in Compute Units (CUs). One CU has 1 vCPU and 4 GB of RAM. A Neon compute can have anywhere from .25 to 7 CUs, as outlined below:

Compute UnitsvCPURAM
.25.251 GB
.5.52 GB
114 GB
228 GB
3312 GB
4416 GB
5520 GB
6624 GB
7728 GB

A connection from a client or application activates a compute. Activity on the connection keeps the compute in an Active state. A defined period of inactivity (5 minutes by default) places the compute into an Idle state.

Factors that affect active hours include:

  • The number of active computes
  • The size of each compute
  • The Autosuspend feature, which suspends a compute after 5 minutes of inactivity by default. Users on paid plans can configure the autosuspend timeout or disable it entirely.
  • The Autoscaling feature, which allows you to set a minimum and maximum compute size. Compute size automatically scales up and down between these boundaries based on workload.

note

Neon uses a small amount of compute time, included in your billed compute hours, to perform a periodic check to ensure that your computes can start and read and write data. See Availability Checker for more information.

The compute hours formula is as follows:

compute hours = compute size * active hours

Estimate your compute hour usage

To estimate what your compute hour usage might be per month:

  1. Determine the compute size you require, in Compute Units (CUs).

  2. Estimate the amount of active hours per month for your compute(s).

  3. Input the values into the compute hours formula:

    compute hours = compute size * active hours

    For example, this is a calculation for a 2 vCPU compute that is active for all hours in a month (approx. 730 hours):

    2 * 730 = 1460 compute hours

    This calculation is useful when trying to select the right Neon plan or when estimating the extra compute usage you might need.

    note

    If you plan to use Neon's Autoscaling feature, estimating compute hours is more challenging. Autoscaling adjusts the compute size based on demand within the defined minimum and maximum compute size thresholds. The best approach is to estimate an average compute size and modify the compute hours formula as follows:

    compute hours = average compute size * active hours

    To estimate an average compute size, start with a minimum compute size that can hold your data or working set (see How to size your compute). Pick a maximum compute size that can handle your peak loads. Try estimating an average compute size between those thresholds based on your workload profile for a typical day.

Projects

In Neon, everything starts with a project. A project is a container for your branches, databases, roles, and other resources and settings. A project also defines the region your data and resources reside in. We typically recommend creating a project for each application or each client. In addition to organizing objects, projects are a way to track storage and compute usage by application or client.

The following table outlines project allowances for each Neon plan.

PlanProjects
Free Tier1
Launch10
Scale50
EnterpriseUnlimited
  • When you reach your limit on the Free Tier or Launch plan, you cannot create additional projects. Instead, you can upgrade to the Launch or Scale plan, which offer allowances of 10 and 50 projects, respectively.
  • Extra projects are available with the Scale plan in increments of 10 for $50 each. If you use more than 50 projects, you are automatically billed for an extra package of 10 projects. For example, if you use 51 projects during the billign period, you are billed for a package of 10 projects for the month($50). If you use 61 projects, you are billed for two packages of 10 projects ($100) for the month, and so on.

Need help?

Join our Discord Server to ask questions or see what others are doing with Neon. Users on paid plans can open a support ticket from the console. For more detail, see Getting Support.

Last updated on

Edit this page
Was this page helpful?