Thanks for the info.

Just a check on the math - if Win32 has a 2GB max addressable space, 
that includes heap and stack and misc. overhead, right?

If we set resin heap to 1GB and allow each thread to use the 'default' 
of 2048k, and we see the number of threads running at about 700, then we 
have the potential of 2.4GB total memory usage [ 1024MB + (700*2MB) ]. 
This exceeds the 2GB limit. However, if, as you suggest, each thread 
only uses a fraction of the 2MB available to each thread, we could see 
the total memory somewhere between 1GB and 2GB.

So, my question is if we use -Xss1024k, each thread is really using 
between 0 and 1024k depending on what that thread really needs?

+ jay

Knut Forkalsrud wrote:
> On Thu, Jan 8, 2009 at 1:52 PM, Jay Ballinger <> wrote:
>> - When a thread is created, does it grab all of the stack memory, or can
>> the stack memory start small and grow to the default or -Xss size?
> If I'm not mistaken the memory is allocated, but it is virtual memory,
> so unless it is actually used there is no penalty.
> The only problem with allocating too much stack space is that you can
> run out of address space on a 32 bit JVM.
> With typically 2GB max addressable for the app and 10 MBytes per stack
> you are limited to 200 threads.
> -Knut
> _______________________________________________
> resin-interest mailing list

resin-interest mailing list

Reply via email to