[Backgroundrb-devel] Question about backgroundrb and resource usage

Adam Williams adam at thewilliams.ws
Mon Aug 10 19:49:40 EDT 2009

On Aug 10, 2009, at 3:44 PM, Peter Gengler wrote:

> So I have a somewhat general question about backgroundrb and  
> resource usage.  I hadn’t really considered the fact that it spools  
> up a new rails process for each worker until I started making more  
> workers; now that I’m have half a dozen it seems like the current  
> design is really unscalable.  I.e. if my rails stack takes 200MB of  
> memory for example, that means 10 workers use 2GB of memory?  That  
> seems overly excessive to me, am I missing something that prevents  
> that resource bloat?

As far as I have seen, you're not missing anything. I had the same  
problem and ended up having a single worker, with different methods  
for the work. I'm considering getting rid of backgroundrb altogether,  
favoring instead simply loading ActiveRecord and the model classes I  
need, with the hope that a cron task can fire the thing up within a  
few seconds. We need tasks to run every minute, so it must be fast  
loading. Anyway, that would allow us to unload a couple hundred meg at  
Engine Yard.


More information about the Backgroundrb-devel mailing list