Matthias Ernst wrote:
> On Jan 14, 2008 10:25 PM, Charles Oliver Nutter <[EMAIL PROTECTED]> wrote:
> 
>> In really large applications, this footprint can become a real pain
>> though. Should an application that compiles 10k methods need 10k
>> classloaders taking up heap space?
> 
> That is about 6MB according to my book (I can allocate around
> 110000 classloaders in 64MB heap). When you size all maps/vectors/sets
> in ClassLoader
> to 1, you can go to 180000, i.e. around 3.5MB overhead for 10000. I
> agree it isn't great but a real pain?

Well, let's think about it another way...

Rails apps, as an example, require a separate JRuby instance per 
concurrent request, because of some issues with the way Rails is 
designed (certain aspects aren't thread-safe). So if you want 10 apps 
that can handle 10 concurrent requests each, you may have as many as 100 
JRuby instances at a time in a given JVM. So now we're looking at 600MB 
of ClassLoader.

Let's assume you can fix Rails to be thread-safe. Then you still have 
60MB for ten apps on top of everything else. It's less of a pain, but 
it's still 60MB of waste. Waste that has tended to give Java/JVM folks 
like us a bad name.

- Charlie

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" 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/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to