Re: [squid-users] How often should I restart Squid?

From: Hendrik Voigtländer <hendrik@dont-contact.us>
Date: Wed, 23 Jun 2004 14:48:26 +0200

Matus UHLAR - fantomas wrote:

> On 22.06 22:47, Hendrik Voigtländer wrote:
>
>>With "growing" I mean the squid process increasing over the time. If I
>>read the FAQ correctly this could be caused e.g. if more and more
>>objects go in the the cache_dirs thus increasing the space needed for
>>the index, i.e. if squid starts with a clean cache_dir.
>>However, my squid is no longer increasing in process size, cache dirs
>>are full & the load is the same all day.
>>
>>Snapshot from top (idle squid at night).
>>21603 proxy 9 0 1017M 1.0G 1180 S 0.0 50.3 1:46 squid
>>
>>It uses roughly 50% of the RAM (machine has 2GB) , the rest is used by
>>other processes and buffers/cache.
>>
>>I just think it is dangerous to disable swap, if one doesn't know how
>>large the squid process will get, i.e. probably larger than the physical
>>memory and this causing the OS to kill processes randomly (I had this
>>problem with java-stuff eating up all memory).
>
>
> I do not think so. The same can happen if you have swap or not - it's
> always used as virtual memory. Having more VM just delays running machina
> out of it,
True, but this is the point: If you have plenty of swap, there is a much
better chance to recognise and fix the problem before a crash.

  which only happens if there's some memory leak in squid,
> libraries or other applications running on that machine.

What about a squid with a huge index (large cache_dir/lot of cache
objects) and a large cache_mem setting? What happen if squids minimum
memory requirements exceed the virtual memory available (swap or not?).

>
> If your squid is not using more memory for longer time, we can assume
> there's no leak,

Quite sure about that, I use the debian/stable package. I never had a
problem with my selfcompiled squid's on solaris as well.

  and as long as it only uses half of the RAM, you have
> still 1 GB free for processes etc, so you probably do not need swap at
> all.

That is why I disabled it...

>
>
>>What puzzles me is that my machine started to use swap at all as plenty
>>of memory is available, that is why I disabled swap with a perfomance
>>boots as a result.
>
>
> That is feature of VM systems, they store unused data onto swap even if
> it's not needed. If in any case the mamory use will grow, unused data will
> not have to be stored on disk because they alredy are, so the system will
> spare swapping that time.
>
Yes, I remember reading something somewhere about that. Isn't that
behaviour tunable somehow?
Received on Wed Jun 23 2004 - 06:48:40 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jul 01 2004 - 12:00:03 MDT