Dyno Size

Last Updated: 10 March 2014

dyno memory

Table of Contents

A dyno is a lightweight container running a single user-specified command. Dynos are the containers in which your application components run.

Heroku offers three different dyno sizes. Each size has different memory and CPU characteristics, as listed in the table below.

See Optimizing Dyno Usage for guidance on when to consider a different size.

Available dyno sizes

Dyno Size Memory (RAM) CPU Share Multitenant Compute (2) Price/dyno-hour
1X 512MB 1x yes 1x-4x $0.05
2X 1024MB 2x yes 4x-8x $0.10
PX 6GB 100% (1) no 40x $0.80
  1. The PX dyno size (performance dynos) has 8 cores and is highly-isolated.
  2. Overall performance will vary heavily based on app implementation, these figures are expected performance based on perc99 of historical system loads. 1X and 2X dyno performance will vary based on available system resources.

PX and 2X dynos consume free dyno-hours at different rates as 1X dynos. See Usage and Billing for more details.

If your app has only a single web dyno of any size running, it will sleep.

Notes on PX dynos

Heroku previously published a AWS account id and security group name to let customers reference it in their own AWS security group settings. This is no longer recommended and Heroku is no longer publishing our AWS account id. If you have the legacy AWS account id and security group name, referencing those may still work, but only for 1X and 2X dynos. PX dynos run under a different AWS account, and Heroku will not make the id for that account available to customers.

Setting dyno size

Resizing dynos changes the dyno size for all dynos of a process type, and restarts the affected dynos.

CLI

Using the Heroku Toolbelt, you can resize and scale at the same time. The following command scales the number of web dynos to 3, and resizes them to PX:

$ heroku ps:scale web=3:PX

To just resize:

$ heroku ps:resize worker=2X

If you’re resizing to a larger size, you may want to scale down the number of dynos as well. See Optimizing Dyno Usage for guidance.

To view the dyno size of a process type, use the ps command:

$ heroku ps
=== web (2X): `bundle exec unicorn -p $PORT -c ./config/unicorn.rb`
web.1: up 2013/03/27 14:27:58 (~ 6h ago)
web.2: up 2013/03/27 14:47:04 (~ 6h ago)
web.3: up 2013/03/27 15:08:23 (~ 5h ago)

=== worker (1X): `bundle exec rake worker:job`
worker.1: up 2013/03/27 14:39:04 (~ 6h ago)
worker.2: up 2013/03/27 15:08:24 (~ 5h ago)
worker.3: up 2013/03/27 14:30:55 (~ 6h ago)

Dashboard

Using the app’s resources page on Dashboard:

dashboard dyno size

One-off dynos

Memory intensive one-off dynos can also be sized:

$ heroku run --size=2X rake heavy:job

or

$ heroku run --size=PX rake heavy:job

Without the --size flag, one-off dynos will always use the 1X size.

Scheduler

Scheduler supports running one-off 1X, 2X, and PX dynos.

Default scaling limits

By default, a process type can’t be scaled to more than 100 dynos for 1X or 2X sized dynos. A process type can’t be scaled to more than 10 dynos for PX-sized dynos.

Contact sales to raise this limit for your application.

One-off dynos

There are different limits that apply depending on whether the Heroku account is verified or not.

If the account is not verified, then it cannot have more than 3 one-off dynos of size 1X running concurrently. Accounts that aren’t verified can’t create one-off 2X or one-off PX dynos.

For verified accounts, no more than 5 PX-sized one-off dynos can run concurrently.

Contact sales to raise this limit for your application.