Varnish is restarting frequently

Sparsh Gupta sparshgupta at gmail.com
Wed May 9 15:11:37 CEST 2012


Sparsh Gupta


On 9 May 2012 18:37, Daniel Schledermann <varnish at ds.schledermann.net>wrote:

> On Wed, 9 May 2012 18:10:41 +0530, Sparsh Gupta wrote:
>
>>
>>  VARNISH_STORAGE_SIZE=32G
>>>> VARNISH_STORAGE_MALLOC="**malloc"
>>>>
>>> if you have 16 Gb of phisical ram you should not malloc 32 Gb, but
>>> something less than 16 Gb (usually 20% less than the phisical)
>>>
>>
>> Each box is configured with 24GB of swap. they have 16GB physical
>> making them 40GB of available memory. I am using only 80% of it in
>> Varnish as adviced.
>>
>
> It would be more effective for you to use file-storage instead of malloc +
> swap. It does not matter wether you are using SSD or normal harddrives.
>

By efficient do you also mean fast? Unfortunately the only thing I care is
response times out of these boxes. I am happy to get more RAM if needed but
got to have best possible performance/response times out of them (both both
Hits, misses and passed queries). Are you sure file will be better than
malloc + swap as far as speed / response times are concerned


>
>
>>
>> I am unable to figure out a lot of sense out of these numbers and will
>> appreciate any help in fine tuning my varnish instance. I can try with
>> 30G or 28G but what is an idea number if we can conclude something
>> based on this info I found in my syslog
>>  if you want to use more than space you may use file instead of ma
>>
>
> If you have 32G SSD you should cap the memory at around that, but use file
> storage.
>
> Also you had this in your DAEMON_OPTS:
>
>
>
>             -p thread_pools=32 \
>             -p thread_pool_min=25 \
>             -p thread_pool_max=4000 \
>
>
> This is waaaay to high. 2 or 4 threadpools is sufficient, and
> threadpool_max is also very high. It makes for a total of 128000 total
> maximum threads, which I very much doubt that you need.


Thanks for the comments. I will try with lower values. What are the
downsides of high values? My instances do around 4000req/second (max) and
at times, a bunch of them reaches backend due to poor hit rate currently. I
added extra threads to ensure they never choke the server, but if there is
a downside, I will relook. Any way I can find out the best numbers for my
instance (in my live environment, what should I look to find how to further
tweak things)


>
>
>
>
> ______________________________**_________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/**lists/mailman/listinfo/**varnish-misc<https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120509/30c0b3f0/attachment.html>


More information about the varnish-misc mailing list