[zeromq-dev] need to lower memory usage

Goswin von Brederlow goswin-v-b at web.de
Mon Aug 18 12:10:49 CEST 2014


On Fri, Aug 01, 2014 at 11:23:24AM -0700, Dave Peacock wrote:
> Have just run into this same issue. I haven't tried uclibc yet, tho thanks
> for that suggestion, will investigate later. For those of you running
> embedded linux or similar, under posix it looks like there are a few
> options for controlling this.
> 
> * Before the thread is created, you could call pthread_attr_setstacksize (
> http://man7.org/linux/man-pages/man3/pthread_attr_setstacksize.3.html).
> This requires modifying zeromq source.

What exactly is the problem with stacksize? Are you running out of
address space or don't you have memory overcommit enabled?

Because while the thread might get a few MB of stack only those pages
actually being used should get allocated by the kernel. So a new
thread might show 16MB virtual memory used for the stack the resident
memory will be just the few kiB being actually used (unless you do use
more and then a small stack would segfault).

MfG
	Goswin



More information about the zeromq-dev mailing list