Which one to use for process monitoring and why?


Solution 1:

God leaks memory pretty badly so I chose Monit for my VPS. Monit runs at about 2MB of RAM constantly, whereas my god install running on Ruby 1.8.6 leaked out to about 60MB of RAM in about 36 hours. I didn't want to monitor my system monitoring tool so I scrapped God and went over to Monit and have had absolutely no problems.

Solution 2:

Both solutions are good, and there are some pros and cons for both of them.

God config file is written in Ruby, so you can do basically everything Ruby allows you to do, and it's a lot of stuff. Monit has to be configured using its own syntax, it's usually OK but more restrictive. Anyway, you can also generate monit config with Ruby (as a part of your deployment strategy).

Also, monit uses less resources, so if you're on VPS or just don't have any spare memory, monit could be a better choice. Personally, I prefer god, as it's more configurable.

Here's a very good screencast on god. There's also a lot of feedback in comments to this screencast.

Solution 3:

God has a lot of problems including:

  1. It leaks memory
  2. It has trouble stopping and restarting processes

I did a write-up about it at http://blog.bradgessler.com/use-monit-with-rails-not-god

The only real problem with monit (if its a problem) is that the configuration files can get a bit verbose if you're running large clusters, but this could be solved with a templating system.

Solution 4:

I had a ton of problems even getting God to run at all on my dedicated Ubuntu server. I eventually just gave up. Monit may not be Ruby, but it's largely hassle-free.

Solution 5:

To anyone finding this post going forward, you might also consider bluepill as an alternative to God. While I'd hope that God has addresses its memory issues in the past two years, I know bluepill was set out from the beginning to run on a small footprint. While still not as small as monit, bluepill's footprint is very reasonable (~16 MB VIRT, 13 MB RES for me).