Heroku Postgres Production Tier Technical Characterization
Last updated April 12, 2023
Table of Contents
The information in this document is subject to change as Heroku adapts the service to better handle customer database workloads.
Heroku Postgres plans offer different performance characteristics based on their CPU, RAM, and I/O architectures. This article provides a technical description of the implementation of Standard-tier and higher plans, along with important performance characteristics for each plan.
Performance Characteristics
The following table outlines Heroku Postgres Standard-tier and higher plans, along with relevant specifications about the underlying hardware:
Plan | vCPU | RAM | PIOPs | Burstable vCPU | Connection Limit | Disk Size | Burstable Disk |
---|---|---|---|---|---|---|---|
standard-0 premium-0 private-0 shield-0 | 2 | 4 GB | 200 | yes, limited | 120 | 64 GB | no |
standard-2 premium-2 private-2 shield-2 | 2 | 8 GB | 750 | no | 400 | 256 GB | no |
standard-3 premium-3 private-3 shield-3 | 2 | 15.25 GB | 1000 | no | 500 | 512 GB | no |
standard-4 premium-4 private-4 shield-4 | 4 | 30.5 GB | 2000 | no | 500 | 768 GB | no |
standard-5 premium-5 private-5 shield-5 | 8 | 61 GB | 4000 | no | 500 | 1 TB | no |
standard-6 premium-6 private-6 shield-6 | 16 | 122 GB | 6000 | no | 500 | 1.5 TB | no |
standard-7 premium-7 private-7 shield-7 | 32 | 244 GB | 9000 | no | 500 | 2 TB | no |
standard-8 premium-8 private-8 shield-8 | 64 | 488 GB | 12000 | no | 500 | 3 TB | no |
standard-9 premium-9 private-9 shield-9 | 96 | 768 GB | 16000 | no | 500 | 4 TB | no |
As of January 17, 2018, the performance characteristics of all plans except standard-0, premium-0, and private-0 have been updated. The previous technical characteristics are detailed here.
Run the pg:info
command to check whether your Postgres database has an upgrade available:
$ heroku pg:info
=== HEROKU_POSTGRESQL_RED
Plan Standard 4
Status available
All Heroku Postgres plans aside from the Essential tier are single-tenant plans. A customer’s database and related management software are the sole residents of resources on the instance, offering more predictable performance. However, virtualized infrastructure is still subject to some resource contention, and minor performance variations are expected.
Burstable vCPU Performance
All Heroku Postgres plans come with a baseline level of performance, but standard-0, premium-0, private-0, and shield-0 plans are able to burst past that baseline. Unlike a multi-tenancy model, burstable performance plans allow each database to run in isolation as a single-tenant instance. This means that when your database is provisioned, no other customer is running on the same server. In the event that your database bursts for an extended time, it’s brought back to the original baseline level of performance. If a consistent level of performance is needed, a non-burstable Heroku Postgres plan provides fixed levels of performance.
The baseline level of performance is dictated by the plan type:
Plan | Load Average |
---|---|
standard-0 premium-0 private-0 shield-0 | 0.2 |
Each of these plans can burst past these load averages for a short amount of time. If the database has a sustained load over those amounts, however, it’s brought back to the baseline. Load averages can be found in the Heroku Postgres Server metrics, which are part of your application’s logs.
Burstable Disk Performance
On standard-0, standard-2, premium-0, premium-2, private-0, private-2, shield-0, and shield-2 plans, disk performance is determined by the baseline PIOPS:
Plan | PIOPS |
---|---|
standard-0 premium-0 private-0 shield-0 | 200 |
standard-2 premium-2 private-2 shield-2 | 750 |
Each of these plans can burst past this number of I/O operations per second for a short amount of time. If the database continues to more perform I/O operations per second, then performance is brought back to the baseline PIOPS, which can heavily impact database performance. Both read and write IOPS can be found in the Heroku Postgres Server metrics.
Architecture, vCPU, RAM, and I/O
All Heroku Postgres plans run on 64-bit architectures, ensuring both high performance for internal Postgres operations and interoperability with other features like Forks and Followers across all Standard-tier and higher plans.
vCPU indicates the number of virtual processors on the underlying instance. A larger vCPU count provides higher performance on the virtual server or instance.
RAM is the approximate amount of memory used for data caching. An in-depth discussion on Postgres caching can be found in Understanding Heroku Postgres Data Caching.
All instances are backed by EBS-optimized instances where EBS disks with provisioned IOPs are attached. PIOPs are a measure of how many I/O operations the underlying disks can perform per second. The number of IOPs provisioned for each plan determines its I/O throughput. On write-heavy applications, I/O can be a significant bottleneck, but on read-heavy ones, your hot dataset fits in RAM and can therefore perform well with lower IOPs values.
Data Encryption
All Standard-tier and higher plans are encrypted at rest with AES-256, block-level storage encryption. Keys are managed by Amazon, and individual volume keys are stable for the lifetime of the volume. You can find more detail about EBS encryption here. Heroku doesn’t encrypt anything for you at the Postgres level, so if you wish to encrypt, you can use the PGCrypto extension for your own encryption.
All backup files that are taken using Heroku PGBackups are stored in an encrypted S3 bucket in the US region.
Technical Characterization of Databases Created Before January 17, 2018
Heroku Postgres plans provisioned before January 17, 2018, had the following performance characteristics:
Plan | vCPU | RAM | PIOPs | Burstable | Connection Limit | Disk Size |
---|---|---|---|---|---|---|
standard-0 premium-0 private-0 | 2 | 4 GB | 200 | yes, limited | 120 | 68 GB |
standard-2 premium-2 private-2 | 2 | 8 GB | 200 | yes, limited | 400 | 256 GB |
standard-4 premium-4 private-4 shield-4 | 2 | 15.25 GB | 1000 | no | 500 | 512 GB |
standard-5 premium-5 private-5 shield-5 | 4 | 30.5 GB | 2000 | no | 500 | 1 TB |
standard-6 premium-6 private-6 shield-6 | 8 | 61 GB | 3000 | no | 500 | 1 TB |
standard-7 premium-7 private-7 shield-7 | 16 | 122 GB | 4000 | no | 500 | 1 TB |
standard-8 premium-8 private-8 shield-8 | 32 | 244 GB | 4000 | no | 500 | 1 TB |