Automatically creates a gemset and uses it via RVM. Currently using 1.9.3 for help with encoding.
$ gem install bundler $ bundle $ rake db:migrate $ rails s
To install redis:
$ brew install redis
To start redis:
$ redis-server /usr/local/etc/redis.conf
To start resque workers:
$ COUNT=10 QUEUE=end_point_queue rake resque:workers SKIP_RAILS=true INTERVAL=0.5 $ COUNT=3 QUEUE=response_queue rake resque:workers
View the rescue UI:
The 10 end_point workers do not load the rails env to save on memory. With the rails env these workers were about 51mb, without it they are 14mb. So over all the workers that is a saving of 370mb or RAM.
The 3 response_queue workers do load the rails env as they use AR to save the results. This queue is not time sensitive and is fast to process so less workers is fine.
In terms of memory, remember that the workers are forked before processing so the worker memory required could double (if all workers are processing at the same time).