how small can I make the thread stack size?

Chris Hecker checker at d6.com
Wed Jul 28 11:24:53 CEST 2010


Alright, I'll try 256kb and see how it goes.  I'm doing it with a config 
param to varnishd, which unfortunately makes it still use 10mb stacks 
for the other 6 threads it's running.  I wonder if I should use ulimit 
in the init script to avoid this and save 60mb...

Thanks,
Chris


On 2010/07/28 01:29, Cosimo Streppone wrote:
> On Wed, 28 Jul 2010 08:02:50 +0200, Chris Hecker <checker at d6.com> wrote:
>
>> [stack size] I've seen people talking about 256kb, but then the docs
>> are pretty sketchy on whether it's a good idea to change it at all,
>> Any advice?
>
> We're running several varnish instances.
> All of them x86-64 though, so YMMV.
>
> For the busiest machines, stack size has been set to 256kb, by putting
> 'ulimit -s 256' in the init script.
>
> IIRC, we started doing this because we saw increases in the
> 'thread_limited'
> counter.
> We saw that varnishd couldn't create new threads,
> even if the hard limit (thread_pool_max) hadn't been reached yet.
> Check:
>
> http://lists.varnish-cache.org/pipermail/varnish-misc/2009-August/002977.html
>
>
> These particular instances are constantly running 7k threads,
> occasionally going to 8-9k. With 24 Gb of RAM.
>




More information about the varnish-misc mailing list