public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Over used cache memory?
@ 2003-11-06  8:05 Wee Teck Neo
  2003-11-06  8:25 ` Nick Piggin
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Wee Teck Neo @ 2003-11-06  8:05 UTC (permalink / raw)
  To: linux-kernel

My system having 1GB ram and this is the output of vmstat

   procs                      memory      swap          io     system      
cpu
r  b  w   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy 
id
0  0  0   5640  21224 121512 797832    0    0     6     9    3    17  0  0  
6


It seems that 797MB is used for caching... thats a high number. Anyway to 
set a lower cache size?

I've read about the /proc/sys/vm/buffermem but my /proc doesn't have it.

Kernel: 2.4.22

_________________________________________________________________
Get 10mb of inbox space with MSN Hotmail Extra Storage 
http://join.msn.com/?pgmarket=en-sg


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Over used cache memory?
@ 2003-11-06  9:15 Wee Teck Neo
  2003-11-06 19:07 ` Jose Luis Domingo Lopez
  0 siblings, 1 reply; 13+ messages in thread
From: Wee Teck Neo @ 2003-11-06  9:15 UTC (permalink / raw)
  To: linux-kernel

   procs                      memory      swap          io     system      
cpu
r  b  w   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy 
id
1  0  0  92744   9640  20240 801644    0    0     3    10   17     0 25  2 
10


This one will be wierd.

I'm having 4 program running at background using 50MB each (got it from 
"top")
Total up to about 200MB.

The system is having 1GB ram and currently using 92MB as swap. Why does the 
system use the slower swap when there are still memory available (as cache). 
Anyway to "force" the system to use more ram instead of putting into swap 
memory?



----Original Message Follows----
From: Helge Hafting <helgehaf@aitel.hist.no>
To: Wee Teck Neo <slashboy84@msn.com>
CC: linux-kernel@vger.kernel.org
Subject: Re: Over used cache memory?
Date: Thu, 06 Nov 2003 10:11:50 +0100

Wee Teck Neo wrote:
>My system having 1GB ram and this is the output of vmstat
>
>   procs                      memory      swap          io     system      
>cpu
>r  b  w   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy 
>id
>0  0  0   5640  21224 121512 797832    0    0     6     9    3    17  0  0  
>6
>
>
>It seems that 797MB is used for caching... thats a high number. Anyway to 
>set a lower cache size?

Yes - _use_ the memory for something else. 1. All unused memory will be put 
to good use as cache.
2. Memory is taken from the cache whenever you need it for
   something else, so (1) is not a problem at all.

Helge Hafting

_________________________________________________________________
Take a break! Find destinations on MSN Travel. http://www.msn.com.sg/travel/


^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <BAY4-F18tJyMmxsywxZ00005d1a@hotmail.com>]
* Re: Over used cache memory?
@ 2003-11-06  9:33 Wee Teck Neo
  0 siblings, 0 replies; 13+ messages in thread
From: Wee Teck Neo @ 2003-11-06  9:33 UTC (permalink / raw)
  To: linux-kernel

Ok...... Thanks got an idea how linux uses memory.

Thanks


----Original Message Follows----
From: Jerry Lundström <jerry.lundstrom@it.su.se>
To: Wee Teck Neo <slashboy84@msn.com>
CC: linux-kernel@vger.kernel.org
Subject: Re: Over used cache memory?
Date: Thu, 06 Nov 2003 10:16:19 +0100

Wee Teck Neo wrote:
>But seems like the swap space is begin used because of "insufficent" free 
>memory. I'm not sure if there is a performance slow down.
>

no no no, this is the way linux works. Memory from programs that are not 
accessed alot are put into the swap so that the not-so-offen-used memory can 
be used by other programs or the cache to speed up everything. When that 
program later access the swaped memory it will load it up and remove some of 
the cache and after a while it will put it back into the swap (dont have any 
numbers on how long till it will but trust linux, it does it very good).

I wouldnt worry at all about those numbers, they are very common in 1gig 
server systems and ive worked with alot of them, even 4gig mem systems use 
the swap, thats what its for...

If you are worried about preformance with memory and such after all 
configure you systems like this:

If you use IDE have the system disk on one IDE channel and a standalone swap 
disk on another IDE channel (not master or slave way but ide0 or ide1). For 
SCSI you can just put the swap on a seperate disk.
Doing this will speed up alot of stuff since linux have 100% access to the 
swap when it needs too, it doesnt have to share the IO to the disk with 
another partition.

Otherwise Id just say, dont worry about it... Linux knows what its doing...

hope it helps...

_________________________________________________________________
Keep track of Singapore & Malaysia stock prices. 
http://www.msn.com.sg/money/


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-11-06 21:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-06  8:05 Over used cache memory? Wee Teck Neo
2003-11-06  8:25 ` Nick Piggin
2003-11-06  8:59 ` Jerry Lundström
2003-11-06  9:11 ` Helge Hafting
2003-11-06 13:40   ` jlnance
2003-11-06 14:14     ` Gianni Tedesco
2003-11-06 21:47       ` jlnance
  -- strict thread matches above, loose matches on Subject: below --
2003-11-06  9:15 Wee Teck Neo
2003-11-06 19:07 ` Jose Luis Domingo Lopez
2003-11-06 19:57   ` Maciej Zenczykowski
2003-11-06 20:50     ` Daniel Gryniewicz
     [not found] <BAY4-F18tJyMmxsywxZ00005d1a@hotmail.com>
2003-11-06  9:16 ` Jerry Lundström
2003-11-06  9:33 Wee Teck Neo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox