[Borges-users] performance/memory

Eric Hodel drbrain at segment7.net
Sun Apr 11 07:11:54 EDT 2004


Eric Hodel (drbrain at segment7.net) wrote:

> ??????? ???????? (slepnev_v at rambler.ru) wrote:
> 
> > Hi,
> > 
> > today I implemented my first small Borges app - wanted to show off 
> > Borges to my employer on Monday. I tried a small stress test: just 
> > clicking on links a lot of times, and watching the Task Manager 
> > window. 
> > 
> > The first version (which stored a continuation for every click) 
> > increased the memory about a megabyte per click, and started thrashing 
> > wildly at something like 80 megs. No response in 5 minutes. 
> > Unacceptable.
> > 
> > The second version did not store any continuations, but increased the 
> > memory about 500K a click. I decided not to wait until it starts 
> > thrashing =) So:
> > 
> > 1) Eric, you have a major bug somewhere. (Or is it Matz? =)
> 
> I'm quite certain its mine.  (I would be very, very suprised if it was a
> Ruby flaw.)
> 
> There are two problems with Borges, one is a bug where memory grows
> seemingly unbounded.  I need to track this down still.

Ok, I've made some small progress on this one.  Memory still grows
unbounded, but I've fixed a rather big bug in Weak::IdentityKeyHash
where it wouldn't remove expired keys from the hashes.  Whoops!

The sushinet application still grows to about 30M after twenty clicks,
then on up to around 80M or 90M at 40 clicks. :(

I think there's more work to be done in this area.

There is still room for improvement here, since there is one Weak::Key
for every time it gets stuck in a Weak::IdentityKeyHash.  Perhaps I can
cache which hashes the key belongs in, in order to cut down on the
number of Weak::Keys floating around.

-- 
Eric Hodel - drbrain at segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/borges-users/attachments/20040411/1e3c20d3/attachment.bin


More information about the Borges-users mailing list