On Fri, May 09, 2008 at 05:38:38PM +0200, Vasiljevic Zoran wrote:

> Recently we launched internal development of the module being
> able to handle 1000+ "users" (in our product-terms, workstations)
> with a stock 4 GB memory off-the-shelf machine like xserve or
> a Mac Pro. If we'd to make a thread-per-workstation, we'd need
> 1000 * at_least_10MB of virtual memory!

> What Tcl really lacks is a per-thread and global state.
> And I see _no_way_ how this can be made... Grmpf.

So you probably have 10 MB or so of proc definitions, which are 95+%
or even 100% identical in every thread, but Tcl keeps a completely
separate 10 MB copy in each and every thread.  What you really want is
to just have a single read-only 10 MB copy of all those Tcl proc
definitions, and have all 1000 otherwise completely independent Tcl
interps use those same procs.

Zoran, have you talked to Jeff Hobbs about this?  He has mentioned
possibly adding "interp cloning" and other sorts of related stuff on
the AOLserver list before.  I understand that the compiled Tcl byte
code is somehow specific to the interpretor where it was compiled, so
it doesn't (currently) work to somehow have just one copy that you use
from multiple interps in multiple threads.  But perhaps there's some
good way to improve that...

-- 
Andrew Piskorski <[EMAIL PROTECTED]>
http://www.piskorski.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to