[Mongrel] OptimizedMutex for Mongrel
luislavena at gmail.com
Wed Nov 8 22:07:28 EST 2006
On 11/8/06, Ezra Zygmuntowicz <ezmobius at gmail.com> wrote:
> Hey Zed-
> The other day I saw a ruby C extension that Mentalguy built called
> optimized_locking. It has an OptimizedMutex class that is written in
> C. Its actually pretty small amount of C code and fairly easy to
> Anyway, long story short, I patch the latest mongrel trunk and added
> this optimized_locking.c in as another C extension that gets built
> when you make the gem. It has helped quite a bit with the mem leak
> and seems to have better performance then Sync. I'm not suggesting
> this is needed in core mongrel but I thought I would share with you
> anyway to see what you think. I am attaching a gem built from svn
> trunk mongrel with the new OptimizedMutex C extension built it. I
> only used the OptimizedMutex for the rails handler so thats all that
> is patched in this gem. Play around with it and let me know if you
> can tell the difference.
That's good, checked your code but build on win32 failed miserably.
> I have been using the same OptimizedMutex in Merb and it hasn't
> caused any issues yet. In fact it is measurably faster then the
> normal Mutex or Sync, even if only by a little. But it has pretty
> flatline memory consumption
Because cannot get extension built, could you run this pastie against
the new locking mechanism?
Thank you Ezra for your time, and thank you for pointing this info.
Hope we could get it working on Win32 side too. (I'm getting illegal
use of this type errors in WaitEntry *e)
> If anyone has any leaky apps and they want to try this out then
> please measure before and after and let me know the results.
> -- Ezra Zygmuntowicz
> -- Lead Rails Evangelist
> -- ez at engineyard.com
> -- Engine Yard, Serious Rails Hosting
> -- (866) 518-YARD (9273)
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
More information about the Mongrel-users