How many CPU cores has a heroku dyno?

The number of CPUs is not published and is subject to change, but you can find out at runtime by running grep -c processor /proc/cpuinfo.


According to https://blog.heroku.com/archives/2014/2/3/heroku-xl

|       | 1X Dyno      | Performance Dyno  |
|-------|--------------|-------------------|
| RAM   | 512 MB       | 6 GB              |
|       | 1x - 4x      | 40x (8 CPU cores) |
| Price | $0.05 / hour | $0.80 / hour      |

The 2X dynos also have 4 cores:

$ heroku run --size=2X grep -c processor /proc/cpuinfo --app app-name
Running grep -c processor /proc/cpuinfo on app-name... up, run.3685
4

But the PX dynos have 8 cores:

$ heroku run --size=PX grep -c processor /proc/cpuinfo --app app-name
Running grep -c processor /proc/cpuinfo on app-name... up, run.4731
8