I see. I didn't get that the point that you were originally trying to make is that the mutex is being wrapped around an entire request.
That being said, and correct me if I'm wrong, but the only reason that I can think of that someone would turn the mutex on is if they are doing something that isn't thread-safe in one of their controllers/models. Presumably DM has its own conflict resolution mechanisms at the database level. -----Original Message----- From: "Matt Aimonetti" <[EMAIL PROTECTED]> Date: Tue, 16 Sep 2008 23:44:04 To: <[email protected]> Subject: [merb] Re: Merb mutex lock Kurt, this is exactly my point. I just wanted to show that removing the mutex on slow actions would obviously make the application way faster. The benchmark numbers aren't important. What's important to see is that when the mutex is on it's applied to your action and not only the DB transactions, here is the action I tested: def index sleep(0.1) Test.first.text end (Test beind a DM model with a text attribute) I hope my intentions are clearer now. -Matt On Tue, Sep 16, 2008 at 11:37 PM, Kurt Schrader <[EMAIL PROTECTED]> wrote: > If you add in 0.1 seconds of sleep time inside a mutex then you've > rate-limited yourself to a maximum of 10 requests a second, as each request > can't process until the previous one is finished. (1/.1 = 10) > > This is not a good benchmark. > > -Kurt > > -----Original Message----- > From: "Matt Aimonetti" <[EMAIL PROTECTED]> > > Date: Tue, 16 Sep 2008 22:57:47 > To: <[email protected]> > Cc: <[EMAIL PROTECTED]> > Subject: [merb] Merb mutex lock > > > > After John Bressnik from SDRuby asked questions about Merb mutex, I > run some benchmarks. > > I was hitting a controller making 1 simple DB request and I couldn't > see a difference between the mutex lock being on or off. > > I then added a sleep of 0.1 in the controller are here are the dramatic > results: > > http://gist.github.com/11201 > > Requests per second: 9.81 [#/sec] (mean) with mutex on VS Requests > per second: 83.26 [#/sec] (mean) mutex off > > The benchmark app was using DM. > > -Matt > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
