[Backgroundrb-devel] CPU/Memory usage of BackgroundDrb

hemant gethemant at gmail.com
Thu Feb 5 19:36:34 EST 2009


Okay, for running a profiler on your application. You will have to
explicitly require "ruby-prof" in your worker code. Ruby-Prof has
options for where to write the profiling data and stuff.

I wouldn't worry about 1-5% CPU usage btw because essentially its
polling sockets (and database too). But sometimes the way different
gems interfact can throw a boner.

On Fri, Feb 6, 2009 at 3:18 AM, Christian Billen
<cbillen at warmlyyours.com> wrote:
> Hi,
> I have tried with persistent off and debug log on, I tailed the debug log
> file but see no activity, yet I still see cpu activity for the process.
>
> Christian Billen
> Director of IT
> Warmlyyours.com, inc.
>
> Phone: (800) 875-5285 ext.800
> Fax:      (847) 550-2600
> Email:   cbillen at warmlyyours.com
>
> WarmlyYours
> Honeywell authorized licensee
> 2 Corporate Dr., Suite 100
> Long Grove, Illinois 60047
>
> Visit the WarmlyYours website at: www.warmlyyours.com
>
> 24/7 Installation Support • Lifetime Technical Assistance • Free Design
> Service
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> If you have received this email in error please notify the system manager.
> Please note that any views or opinions presented in this email are solely
> those of the author and do not necessarily represent those of the company.
>
>
> On Thu, Feb 5, 2009 at 3:45 PM, Samer Masry <enzodm at gmail.com> wrote:
>>
>> I would turn on debug for active record and see if you can correlated the
>> spikes of the cpu with the backgroundrb call to the db queue since you are
>> using a persistant queue.
>>
>> Have a tail of your log file open and another window with top.
>>
>> -Samer Masry
>> dryBlis
>>
>> On Thu, Feb 5, 2009 at 12:43 PM, Christian Billen
>> <cbillen at warmlyyours.com> wrote:
>>>
>>> Hi there,
>>>
>>> Well I disabled the schedule for all the workers, so all i have left in
>>> backgrounddrb.yml is
>>>
>>> When I start backgrounddrb on Ubuntu 8.10 I get the 4-5% cpu humming on
>>> packetworker and backgrounddrb.  I get this issue also on my rails app
>>> running on Mac OS X 10.5
>>> This is all I have in my backgrounddrb.yml:
>>> :backgroundrb:
>>>   :ip: 0.0.0.0
>>>   :port: 11006
>>>
>>> gem versions:
>>> rails (2.2.2)
>>> packet (0.1.14)
>>> chronic (0.2.3)
>>>
>>> Background drb installed from
>>> sudo ./script/plugin install git://github.com/gnufied/backgroundrb.git
>>>
>>> Since no background drb workers are running at all I do not know how to
>>> profile this as you suggest.
>>> Where else could look to determine where this is coming from?
>>>
>>> Thank you
>>> Christian Billen
>>> Director of IT
>>> Warmlyyours.com, inc.
>>>
>>> Phone: (800) 875-5285 ext.800
>>> Fax:      (847) 550-2600
>>> Email:   cbillen at warmlyyours.com
>>>
>>> WarmlyYours
>>> Honeywell authorized licensee
>>> 2 Corporate Dr., Suite 100
>>> Long Grove, Illinois 60047
>>>
>>> Visit the WarmlyYours website at: www.warmlyyours.com
>>>
>>> 24/7 Installation Support • Lifetime Technical Assistance • Free Design
>>> Service
>>> This email and any files transmitted with it are confidential and
>>> intended solely for the use of the individual or entity to whom they are
>>> addressed. If you have received this email in error please notify the system
>>> manager. Please note that any views or opinions presented in this email are
>>> solely those of the author and do not necessarily represent those of the
>>> company.
>>>
>>>
>>> On Thu, Feb 5, 2009 at 4:26 AM, hemant <gethemant at gmail.com> wrote:
>>>>
>>>> I doubt there would be a problem with bdrb. However I would suggest
>>>> you to run your program with ruby-prof or use one of the memory
>>>> profiles (bleakhouse).
>>>>
>>>> Try to reduce the case and paste your worker code.
>>>>
>>>>
>>>> On Wed, Feb 4, 2009 at 10:56 PM, Christian Billen
>>>> <cbillen at warmlyyours.com> wrote:
>>>> > Good morning list,
>>>> > We are a new user of BackgroundDrb and we use it to run specific
>>>> > cron-like
>>>> > jobs at certain times of the day
>>>> > What we've been noticing is that even when no jobs are running,
>>>> > backgrounddrb will be running and 'humming' .  This happen as soon as
>>>> > background drb is started. Notice the CPU usage for it and packet
>>>> > worker
>>>> > will be between 4% to 7%
>>>> >   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>>>> >
>>>> >
>>>> > 22523 heatwave  20   0  284m 134m 1292 S    3  6.6   0:01.94 ruby
>>>> >
>>>> >
>>>> > 22524 heatwave  20   0 99.7m  41m 3200 S    1  2.0   0:01.68
>>>> > packet_worker_r
>>>> >
>>>> >
>>>> > My packet gem is at this release:
>>>> > packet (0.1.14)
>>>> >
>>>> > My backgrounddrb is at this release:
>>>> > 1.1
>>>> >
>>>> > Running on ubuntu 8.10 x86 on slicehost
>>>> > Here's our backgrounddrb.xml, i've tried with or without debug, as you
>>>> > can
>>>> > see the script are only running once a day.
>>>> > :backgroundrb:
>>>> >   :ip: 0.0.0.0
>>>> >   :port: 11006
>>>> >   :debug_log: true
>>>> > :schedules:
>>>> >   :order_shipped_worker:
>>>> >     :complete_orders:
>>>> >       :trigger_args: 0 30 21 * * * *
>>>> >     :reconcile_committed_items:
>>>> >       :trigger_args: 0 0 22 * * * *
>>>> >     :check_for_receipts:
>>>> >       :trigger_args: 0 30 22 * * * *
>>>> >   :exchange_rates_worker:
>>>> >     :get_exchange_rates_for_today:
>>>> >       :trigger_args: 0 0 6 * * * *
>>>> >     :get_all_exchange_rates:
>>>> >       :trigger_args: 0 30 6 1 * * *
>>>> >
>>>> > Can anyone shed some light on how to debug or is this cpu usage
>>>> > normal?
>>>> > Thank you
>>>> >
>>>> > Christian Billen
>>>> > Director of IT
>>>> > Warmlyyours.com, inc.
>>>> >
>>>> > Phone: (800) 875-5285 ext.800
>>>> > Fax:      (847) 550-2600
>>>> > Email:   cbillen at warmlyyours.com
>>>> >
>>>> > WarmlyYours
>>>> > Honeywell authorized licensee
>>>> > 2 Corporate Dr., Suite 100
>>>> > Long Grove, Illinois 60047
>>>> >
>>>> > Visit the WarmlyYours website at: www.warmlyyours.com
>>>> >
>>>> > 24/7 Installation Support • Lifetime Technical Assistance • Free
>>>> > Design
>>>> > Service
>>>> > This email and any files transmitted with it are confidential and
>>>> > intended
>>>> > solely for the use of the individual or entity to whom they are
>>>> > addressed.
>>>> > If you have received this email in error please notify the system
>>>> > manager.
>>>> > Please note that any views or opinions presented in this email are
>>>> > solely
>>>> > those of the author and do not necessarily represent those of the
>>>> > company.
>>>> >
>>>> > _______________________________________________
>>>> > Backgroundrb-devel mailing list
>>>> > Backgroundrb-devel at rubyforge.org
>>>> > http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> 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
>>>
>>>
>>> _______________________________________________
>>> Backgroundrb-devel mailing list
>>> Backgroundrb-devel at rubyforge.org
>>> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>>
>
>



-- 
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


More information about the Backgroundrb-devel mailing list