[Lift] Re: More Actor garbage (collection)

2009-05-20 Thread Jonas Bonér

Great job.

2009/5/18 David Pollak feeder.of.the.be...@gmail.com:
 Folks,

 As you all may or may not know, I've been battling memory retention issues
 with the Scala Actor libraries for 6 or so months now.  I believe that I've
 finally nailed the complete issues.

 They are as follows:

 There is an object called ActorGC that keeps track of all the actors in the
 system.  Due to the implementation as some other bugs in the Actor library,
 the ActorGC code retains references to all Actors that have been created
 until there is significant pressure on the garbage collector, then the
 references may or may not be released.  In order to combat this, I wrote
 code that uses reflection to look through the ActorGC retained references
 and I unretain the references for all Actors that have exited.
 The Actor library sits on top of a modified version of Doug Lea's ForkJoin
 library.  Due to bugs in the library or bugs in the enhancements, the
 library retains references to a substantial number of messages that have
 ever been sent from one Actor to another.  I've replaced the default
 scheduler with a scheduler based on the java.util.concurrent library with a
 default of 10 worker threads.  If you want to use the standard Scala Actor
 scheduler, in Boot, set ActorSchedulerFixer.performFix = false

 I've been running a stress test against the new code that in the past would
 result in retaining 32MB of memory over a 30 minute period.  Over the last
 30 minutes it has not retained any memory.

 I've started a thread on the Scala internals list and I hope that we'll be
 able to get the Actors fixed up for the 2.8 release.

 The above fixes will only impact you if you rely on particular facits of the
 existing Actor scheduling or ActorGC classes.

 Thanks,

 David

 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp

 




-- 
Jonas Bonér

twitter: @jboner
blog:http://jonasboner.com
work:   http://crisp.se
work:   http://scalablesolutions.se
code:   http://github.com/jboner

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: More Actor garbage (collection)

2009-05-20 Thread Timothy Perrett

Sounds great - you mention the schedular library... are you talking
about the actor schedular in lift-util ? Can you describe what would
cause it?

Cheers, Tim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: More Actor garbage (collection)

2009-05-20 Thread Barry Kaplan

Can these fixes be used outside of lift?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: More Actor garbage (collection)

2009-05-20 Thread David Pollak
On Wed, May 20, 2009 at 7:15 AM, Barry Kaplan meme...@gmail.com wrote:


 Can these fixes be used outside of lift?


You can copy the two objects from Lift and use them elsewhere.  There's
nothing Lift-specific about them.




 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: More Actor garbage (collection)

2009-05-19 Thread Meredith Gregory
David,

Bravo! That sounds to be some gnarly sleuthing-n-hacking. BTW, have you run
into any deadlock issues when you replace the scheduler?

Best wishes,

--greg

On Mon, May 18, 2009 at 2:43 PM, David Pollak feeder.of.the.be...@gmail.com
 wrote:

 Folks,

 As you all may or may not know, I've been battling memory retention issues
 with the Scala Actor libraries for 6 or so months now.  I believe that I've
 finally nailed the complete issues.

 They are as follows:

- There is an object called ActorGC that keeps track of all the actors
in the system.  Due to the implementation as some other bugs in the Actor
library, the ActorGC code retains references to all Actors that have been
created until there is significant pressure on the garbage collector, then
the references may or may not be released.  In order to combat this, I 
 wrote
code that uses reflection to look through the ActorGC retained references
and I unretain the references for all Actors that have exited.
- The Actor library sits on top of a modified version of Doug Lea's
ForkJoin library.  Due to bugs in the library or bugs in the enhancements,
the library retains references to a substantial number of messages that 
 have
ever been sent from one Actor to another.  I've replaced the default
scheduler with a scheduler based on the java.util.concurrent library with a
default of 10 worker threads.  If you want to use the standard Scala Actor
scheduler, in Boot, set ActorSchedulerFixer.performFix = false

 I've been running a stress test against the new code that in the past would
 result in retaining 32MB of memory over a 30 minute period.  Over the last
 30 minutes it has not retained any memory.

 I've started a thread on the Scala internals list and I hope that we'll be
 able to get the Actors fixed up for the 2.8 release.

 The above fixes will only impact you if you rely on particular facits of
 the existing Actor scheduling or ActorGC classes.

 Thanks,

 David

 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp

 



-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: More Actor garbage (collection)

2009-05-19 Thread David Pollak
On Tue, May 19, 2009 at 2:34 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 David,

 Bravo! That sounds to be some gnarly sleuthing-n-hacking. BTW, have you run
 into any deadlock issues when you replace the scheduler?


No... the scheduler is a replacement for Doug Lea's FJ library which was
superior for JDK 1.4, but is neutral or worse than the JDK 1.5 thread
pooling libraries.




 Best wishes,

 --greg


 On Mon, May 18, 2009 at 2:43 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Folks,

 As you all may or may not know, I've been battling memory retention issues
 with the Scala Actor libraries for 6 or so months now.  I believe that I've
 finally nailed the complete issues.

 They are as follows:

- There is an object called ActorGC that keeps track of all the actors
in the system.  Due to the implementation as some other bugs in the Actor
library, the ActorGC code retains references to all Actors that have been
created until there is significant pressure on the garbage collector, then
the references may or may not be released.  In order to combat this, I 
 wrote
code that uses reflection to look through the ActorGC retained references
and I unretain the references for all Actors that have exited.
- The Actor library sits on top of a modified version of Doug Lea's
ForkJoin library.  Due to bugs in the library or bugs in the enhancements,
the library retains references to a substantial number of messages that 
 have
ever been sent from one Actor to another.  I've replaced the default
scheduler with a scheduler based on the java.util.concurrent library with 
 a
default of 10 worker threads.  If you want to use the standard Scala Actor
scheduler, in Boot, set ActorSchedulerFixer.performFix = false

 I've been running a stress test against the new code that in the past
 would result in retaining 32MB of memory over a 30 minute period.  Over the
 last 30 minutes it has not retained any memory.

 I've started a thread on the Scala internals list and I hope that we'll be
 able to get the Actors fixed up for the 2.8 release.

 The above fixes will only impact you if you rely on particular facits of
 the existing Actor scheduling or ActorGC classes.

 Thanks,

 David

 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp





 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 1219 NW 83rd St
 Seattle, WA 98117

 +1 206.650.3740

 http://biosimilarity.blogspot.com

 



-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: More Actor garbage (collection)

2009-05-19 Thread Erik Engbrecht
Greg,  It's not exactly deadlock, but you may find this interesting:

https://lampsvn.epfl.ch/trac/scala/ticket/1999

-Erik

On Tue, May 19, 2009 at 5:34 PM, Meredith Gregory
lgreg.mered...@gmail.comwrote:

 David,

 Bravo! That sounds to be some gnarly sleuthing-n-hacking. BTW, have you run
 into any deadlock issues when you replace the scheduler?

 Best wishes,

 --greg

 On Mon, May 18, 2009 at 2:43 PM, David Pollak 
 feeder.of.the.be...@gmail.com wrote:

 Folks,

 As you all may or may not know, I've been battling memory retention issues
 with the Scala Actor libraries for 6 or so months now.  I believe that I've
 finally nailed the complete issues.

 They are as follows:

- There is an object called ActorGC that keeps track of all the actors
in the system.  Due to the implementation as some other bugs in the Actor
library, the ActorGC code retains references to all Actors that have been
created until there is significant pressure on the garbage collector, then
the references may or may not be released.  In order to combat this, I 
 wrote
code that uses reflection to look through the ActorGC retained references
and I unretain the references for all Actors that have exited.
- The Actor library sits on top of a modified version of Doug Lea's
ForkJoin library.  Due to bugs in the library or bugs in the enhancements,
the library retains references to a substantial number of messages that 
 have
ever been sent from one Actor to another.  I've replaced the default
scheduler with a scheduler based on the java.util.concurrent library with 
 a
default of 10 worker threads.  If you want to use the standard Scala Actor
scheduler, in Boot, set ActorSchedulerFixer.performFix = false

 I've been running a stress test against the new code that in the past
 would result in retaining 32MB of memory over a 30 minute period.  Over the
 last 30 minutes it has not retained any memory.

 I've started a thread on the Scala internals list and I hope that we'll be
 able to get the Actors fixed up for the 2.8 release.

 The above fixes will only impact you if you rely on particular facits of
 the existing Actor scheduling or ActorGC classes.

 Thanks,

 David

 --
 Lift, the simply functional web framework http://liftweb.net
 Beginning Scala http://www.apress.com/book/view/1430219890
 Follow me: http://twitter.com/dpp
 Git some: http://github.com/dpp





 --
 L.G. Meredith
 Managing Partner
 Biosimilarity LLC
 1219 NW 83rd St
 Seattle, WA 98117

 +1 206.650.3740

 http://biosimilarity.blogspot.com


 



-- 
http://erikengbrecht.blogspot.com/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---