On Wed, 22 Jun 2011 14:34:25 -0700 Randall Leeds <[email protected]> wrote: > On Wed, Jun 22, 2011 at 05:50, MK <[email protected]> wrote: > > Does anyone have an idea of what a safe minimum stack size is for > > couch? > This is an excellent question and it'd be really cool to hear some > good thoughts on this. > > In particular, I'm not sure what (from a libc perspective) is stack > allocation and what is heap allocation in the Erlang runtime. > Looking around quickly it's not easy to find documentation on BEAM > itself (Bogdan/Björn's Erlang Abstract Machine).
I did not even know that's what it is, thanks ;) > Perhaps there are some more basic questions that we could cross-post > to erlang? I don't think you could simplify it beyond "Do you know how big a stack this application needs?" 256kB seems like a lot to me, I have no idea why someone would need the linux default of 8MB. You can limit thread stack size internally, at least with pthreads. I noticed when doing this on the server that nodejs (or the "libeio" it includes/uses) does that -- it has a very small "allocated memory" footprint by default. Kind of a lesson there for developers perhaps. That beam thing is just colossal, at least on linux. -- "Enthusiasm is not the enemy of the intellect." (said of Irving Howe) "The angel of history[...]is turned toward the past." (Walter Benjamin)
