Re: [squid-users] Memory usage (I know it's been up before.. tricky business)

From: Denis Vlasenko <vda@dont-contact.us>
Date: Wed, 21 Apr 2004 11:05:51 +0300

On Wednesday 21 April 2004 10:42, Martin Svensson wrote:
> > > it swaps out so much.
> >
> > /proc/meminfo, top, etc?
>
> /proc/meminfo
> ---------------
> total: used: free: shared: buffers:
> cached:
> Mem: 3169054720 3149389824 19664896 0
> 728629248 1696555008
> Swap: 1428824064 205070336 1223753728
> MemTotal: 3094780 kB
> MemFree: 19204 kB
> MemShared: 0 kB
> Buffers: 711552 kB
> Cached: 1477108 kB
> SwapCached: 179684 kB
> Active: 2348472 kB
> ActiveAnon: 694016 kB
> ActiveCache: 1654456 kB
> Inact_dirty: 562748 kB
> Inact_laundry: 14012 kB
> Inact_clean: 14308 kB
> Inact_target: 587908 kB
> HighTotal: 2228200 kB
> HighFree: 1780 kB
> LowTotal: 866580 kB
> LowFree: 17424 kB
> SwapTotal: 1395336 kB
> SwapFree: 1195072 kB
> HugePages_Total: 0
> HugePages_Free: 0
> Hugepagesize: 2048 kB
> -----------
> free
> -----------
> total used free shared
> buffers cached
> Mem: 3094780 3073364 21416 0
> 708812 1477084
> -/+ buffers/cache: 887468 2207312
> Swap: 1395336 200264 1195072
> -----------
>
> The buffer/cache is utilizing quite a lot of memory,
> but I always thought they were using spare memory in
> some way for it's allocation. Perhaps this isn't the
> case?

It is perfectly sane to swap out something unused
(think about getties which are unused for weeks)
in order to free some RAM for file cache.

The question is, how aggressive to be with it.

You can:
* play with /proc/sys/vm/swappiness
* run without swap at all, you seem to have enough
  memory for that

I run some of my boxes swapless, it works :)

--
vda
Received on Wed Apr 21 2004 - 02:06:54 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Apr 30 2004 - 12:00:02 MDT