Re: [squid-users] memory leaks

From: Henrik Nordstrom <[email protected]>
Date: Tue, 16 May 2006 22:20:56 +0200

tis 2006-05-16 klockan 13:12 +0300 skrev Edvard Chitro:
> > tis 2006-05-16 klockan 12:14 +0300 skrev Edvard Chitro:
> >
> >> When I start the sistem (without starting squid) only 37 MB of ram gets
> >> used. And usage is constant, no matter how long box is up. After a week
> >> it
> >> still has 37 Mb used and ~400 MB free.
> >
> > What a waste!
>
> It's not a waste it for squid which eats it all and asks for more.

Lots of free memory on a buzy UNIX system is a waste.

And no, your Squid did not ask for much. Only 60-70 MB from what I could
see in your stats.

> >
> >> But if I start squid and let it run, then after ~36 hours I have only 92
> >> Mb free ... and after 7-30 days I get ether box lockup because out of
> >> memory or squid becomes zombie and locks up. The most interesting thing
> >> that swap usage is always remains zero or 132 Kb. Ihave no bad sector on
> >> hard drives. I have checked everything. That irritates me ...
> >
> > This is just the way it should be.
> >
> >> After 40 hours of uptime I get:
> >>
> >> edska@gw:~$ free
> >> total used free shared buffers
> >> cached
> >> Mem: 516312 510772 5540 0 51976
> >> 48876
> >> -/+ buffers/cache: 409920 106392
> >> Swap: 248968 0 248968
> >>

> If you look at free output ...
>
> "buffers + cache" not eq "used"

It should not.

buffers + cache + free equals free -/+ buffers cache. They are all
"free" kind of memory.

To keep your sanity it's always best to look at the third line in free
output (the line starting with "-/+ buffers/cache"). This shows the
adjusted values which makes more sense to look at.

In a busy system the equation is simply

  cached + buffers = total - actively_needed_application_memory - 5MB free

as keeping more totally free is a waste..

(for simplicity kernel is included in "application_memory"...)

What worries me is that you say the active application memory was only
at most 70 MB before you started Squid, and your stats showed Squid
using another 70MB, but the free output indicates 409 MB is now in use..
so something besides Squid is using a lot of memory in your system.

Regards
Henrik

Received on Tue May 16 2006 - 14:21:48 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jun 01 2006 - 12:00:02 MDT