I'm using Django with Celery 3.0.17 and now trying to figure out how many celery workers are run by default.
From this link I understand that (not having modified this config) the number of workers must be currently equal to the number of CPU cores. And that's why I need the former. I wasn't able to find an official answer by googling or searching heroku's dev center. I think it's 4 cores as I'm seeing 4 concurrent connections to my AMQP server, but I wanted to confirm that.
Thanks,
J
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
来源:https://stackoverflow.com/questions/15910965/how-many-cpu-cores-has-a-heroku-dyno