Re: swap vs. RAM
George Dancheff wrote:
>
> Hi, I just compiled some kernels 2.4.x series , and it
> seems to me that all these builds prefer to use my
> swap space instead of my free memory , so the
> performance dropped :((( . I noticed when the mashine
> is not overloaded , free outputs the following :
> debian:/# free
> total used free shared
> buffers cached
> Mem: 60752 59792 960 0
> 1084 34508
> -/+ buffers/cache: 24200 36552
> Swap: 104384 33076 71308
> debian:/#
>
> The mashine uses 1/3 of my swap , but i just started a
> X session with Netscape and KMail . Also Shared must
> be different from 0 ..., but it is not . Couldn't get
> why kernel prefers my swap than my free RAM .
> When the mashine is really overloaded Shared field
> from the 'free' output remains 0 , and swap activity
> really get enormous .
>
> Anyone able to explain why the 2.4 kernel prefers swap
> instead of free RAM ???
as I see you only have almost 1 Mb of RAM free, the kernel allways
keep some memory (about 1-2 Mb of RAM) free; I belive that this is
tunable by changing the source before recompile or through sysctl
if you compiled support for that, altthough I don't know the exact
parameter.
also, you may check some documentation about the new shared memory
model (2.4.x); you may need to add to your fstab the line:
shm /dev/shm shm defaults 0 0
if you have a 2.4.x=< 2.4.3 or:
tmpfs /dev/shm tmpfs defaults 0 0
if you have 2.4.x >= 2.4.4.
note that you have to compile support for it (shm) in the kernel.
and for the 2.4.x kernels free allways reports 0 for shared
memories,
I don't know why (I think I read it in the man); maybe a newer
version
would fix that...
Regards
Dragos
Bucharest, Romania
Reply to: