Hello Marco,

On Fri, Mar 08, 2013 at 02:55:36AM -0800, Marco S wrote:
>
> we have a large customer application in production for a while, all worked
> so far, but currently we encounter huge performance problems.
>
> We use Ruote to process the lead-sales-pipe (validating leads, sending
> documents/emails, schedule for calls, etc)
>
> We have about 200-300 leads per day, but the engine processes only 30-50 a
> day, it takes so much time to step through the process of validation
> (compared to pure ruby implemenation its about 1000 times slower).
>
> I wonder if there are any options to speed up the processing?
>  .. currently it takes about 10 sec to step from one participant to the
> next.

How about measuring first?


> in most participants we access our postgres do process ActiveRecord models
> and do some work, or read data.
> Maybe there is  deadlock/locking issue with that ?

How about adding some time measurement to your participant implementations?

Something along the line of:

---8<---
class MarcoParticipant < Ruote::Participant
  def on_workitem
    t = Time.now
    # ... do the work ...
    workitem["time_spent_#{fei.sid}"] = Time.now - t
    reply
  end
end
--->8---

You could could for finer granularity if that's really an in-participant
issue (we don't know yet).

Maybe that could go to new relic.


> In our specs all works fine and fast, but in production with the
> redis-storage its horrible slow :-/
>
> Btw. I already tried to use multipe worker processes, I cannot see a huge
> difference speed wise, but we see a lot more CPU usage via NewRelic.

Was it all slow since production day 1? Or did it get slower slowly? If you
start a new prod system (some staging instance) is it slow right away?

Could junk messages clog ruote-redis?

If you need some help with observing the engine:

  http://ruote.rubyforge.org/process_observation.html (sorry it's not much)

an observer sees all the events in a ruote worker. It could emit (along with
timestamps) to a log what's going on.

Remember, it's all Ruby, let's measure.

I'd be glad to help, but you shouldn't be afraid to look under the hood. I
can help you place the sensor and later analyze the results.


Best regards,

--
John Mettraux - http://lambda.io/jmettraux

-- 
-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"ruote" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to