LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-18-2005, 09:12 AM   #1
xvanhessianx
LQ Newbie
 
Registered: Mar 2005
Distribution: Novell Linux Desktop 9
Posts: 3

Rep: Reputation: 0
Problems with disk cache and ram


Im using Novell Linux Desktop 9 (based on Suse) and im having trouble with my disk cache eating up all my system memory. I have 512MB or RAM and dont plan on buying anymore right away. My system monitor tells me that on average i have only about 50 MB of free ram before i go on my swap drive. The disk cache is using up about half of my memory and from what ive been told from my other linux using buddies, it should only use up about 16MB. Im need help on how to change the settings of the cache.

thanks.
 
Old 03-19-2005, 02:06 AM   #2
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
To quote a hero of mine:

"Let me 'splain. [pause] No, there is too much. Let me sum up..." Ahem.. RAM. OK..
"You keep using that word. I do not think it means what you think it means."

Linux will use all of your RAM. All of it.

It's memory mangement is not the same as windows. It allocates all of your RAM to the OS aka kernel, so it doesn't have to touch your swap. The kernel controls all memory management and allocates it to kernel processes and then userland apps.

The fact that you have any free is a minor miracle. Unlike windows, it will hit your RAM first for anything you do or don't do. If none is left in the entire allocated space, it will use your swap. If you see your swap space filling up or seeing it task, then be concerned. Otherwise it's a non-issue and actually part of what makes linux better than windows.
 
Old 03-19-2005, 02:12 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,977

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
Shouldn't matter. The fact that you may appear to be approaching total utilization of memory, doesn't mean you will actually soon proceed to using swap space.
Generally you would expect to have the size of the disk cache reduced to accomodate any later higher (program) memory reference. Are you actually seeing any swap utilization, or are you just concerned you might soon ???. If you are swapping, how active does your swap get ???.

Linux prefers memory to swap as it is orders of magnitude faster. Depends on locality of reference, (historical) reference pattern and working set size.

What kernel are you running - 2.6 introduced some user control, but is is a pretty gross adjustment. Gross as in system-wide, not "gross" as in disgusting.
 
Old 03-19-2005, 09:50 AM   #4
xvanhessianx
LQ Newbie
 
Registered: Mar 2005
Distribution: Novell Linux Desktop 9
Posts: 3

Original Poster
Rep: Reputation: 0
im not on my swap yet, but im very close to it. this is with just normal desktop usage and superkaramba open. linux kernel 2.6
 
Old 03-19-2005, 02:50 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,977

Rep: Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281Reputation: 3281
Non issue.
Keep an eye on it, but as you start programs, the usage wll change to cope. Most (desktop) users appear to see no swapping at all, although some is not "bad". When it gets outrageous, time for more memory.

For example, even with a Gig of memory, I can have in excess of a Gig of swap active.
Not your normal usage, but everything still works fine.
 
Old 03-19-2005, 07:42 PM   #6
xvanhessianx
LQ Newbie
 
Registered: Mar 2005
Distribution: Novell Linux Desktop 9
Posts: 3

Original Poster
Rep: Reputation: 0
512kb or ram is good enough for now since im not on the swap yet. i was just curious cause it seemed outragous for linux disk cache to use up half of my memory. anywho as long as its working i guess its best not to f--k with it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to disable the disk cache? sunsfcn Linux - Software 3 07-15-2005 09:20 PM
disk cache emer_son Linux - Newbie 1 08-25-2004 07:47 PM
Disk Cache - How to purge Phorem Linux - Hardware 6 04-21-2004 01:41 PM
hard disk cache. yapp Linux - Hardware 6 10-31-2003 04:50 AM
diff bet RAM & CACHE memory LinuxTiro Linux - Hardware 1 08-30-2003 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration