[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: stack size



On increasing the size of the molecule treated, the procedure immediately crashed with error message

what (): St9bad_alloc

Failure of the () operator was attributed by the program developers to memory exhausion (UMA system, 4 dual-opteron 875, ecc 24GB, of which 1 for debian amd64 etch, set with shmmax). On request I showed 

ulimit -a

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
max nice                        (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) unlimited
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) unlimited
max rt priority                 (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

The comment was: The item that is suspiciously small is the stack size. Did you try to set it to unlimited?

I did, with 

ulimit -s unlimited

though, () failure was not solved. I am still investigating the issue.

>From that, I extrapolated (now clearly wrongly) that setting stack size to unlimited may be beneficial to have all available memory used in memory-demanding computation.

Thanks
francesco pietra


--- On Tue, 4/22/08, Goswin von Brederlow <goswin-v-b@web.de> wrote:

> From: Goswin von Brederlow <goswin-v-b@web.de>
> Subject: Re: stack size
> To: chiendarret@yahoo.com
> Cc: "amd64 Debian" <debian-amd64@lists.debian.org>
> Date: Tuesday, April 22, 2008, 10:04 AM
> Francesco Pietra <chiendarret@yahoo.com> writes:
> 
> > With amd 64 etch (NUMA 4 dual-opteron, 24 GB RAM, set
> with shmmax) it was suggested (for heavy calculations) to
> set 'stack size' to 'unlimited'.
> >
> > At each new boot, I do that with 
> >
> > $ ulimit -s unlimited
> >
> > thus changing the stack size from usual 8192 kbytes.
> If there is no drawback in setting 'stack size' to
> u'nlimited', how do set that permanently?
> >
> > Thanks
> > francesco pietra
> 
> Who suggested such a thing? The only reason to change the
> stack limit
> would be when you have some application that segfaults with
> a stack
> overflow without that being a bug. The stack limit is
> helpfull in
> catching programms running into an endless recursion early
> so I
> wouldn't change it.
> 
> The drawback of an unlimited stack size is that a simple
> endless
> recursion will eat up all your memory until the
> out-of-memory killer
> gets triggered.
> 
> MfG
>         Goswin
> 
> 
> -- 
> To UNSUBSCRIBE, email to
> debian-amd64-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


Reply to: