On Dec 19, 2007 1:51 AM, Reynard <reynard.list at gmail.com>
wrote:>
> I''m just curious where does the process status get stored? Is it
in the
> backgroundrb process, or some external storage?
> The reason I''m asking is because I have been doing stress testing
by
> creating thousands of workers (with uniq job_key), each does
register_status
> and exit after it''s done.
> I have been monitoring the memory usage of the backgroundrb server. At
first
> the memory usage increases to a certain extent and then seems to stop
> increasing, although it seems that I still can access the status of all
> workers.
>
> Which makes me wonder if there is some kind of garbage collection on the
> status?
>
> Since I''m planning to use this for external authentication,
it''s possible
> that we create thoudsands of process in a day. After the user is
> authenticated there is no need to keep the status around for a long time.
so
> I''m just concern about the memory usage or storage for this old
worker
> status. I don''t want to have to restart backgroundrb regularly.
>
> any thought?
>
Process status objects are stored in master process, and since they
generally do not consume much memory, i do not see any reason for
exponential growth in process size. Also, there is no garbage
collection apart from default Ruby one.
However, if you are worrried about growth of memory because of that in
long run, you may try to pass memcache option in configuration file,
so as status objects are stored in memcache.
--
Let them talk of their oriental summer climes of everlasting
conservatories; give me the privilege of making my own summer with my
own coals.
http://gnufied.org