LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-15-2005, 04:03 AM   #1
sunsfcn
LQ Newbie
 
Registered: May 2005
Posts: 3

Rep: Reputation: 0
Is it possible to disable the disk cache?


when I port ArmLinux to a 8MB RAM, I find Cache take a lot of memory.Cache is to speed up disk I/O,but I have no disk .So I want to diable Disk Cache.And how can I do that?
 
Old 07-15-2005, 04:23 AM   #2
Zeistler
Member
 
Registered: May 2004
Distribution: Slackware
Posts: 108

Rep: Reputation: 15
Hi

The large cache is caused by the behavior of Linux. Linux will keep old memory pages in memory just in case they are needed again, when you run the same program again for example. The reason for this behavior is that the internal memory is so much faster than the virtual memory on the harddrive that in order to reach maximum performance the internal memory must be used to the max.

I am not aware of any way to change this arrangement. And quite frankly why would you want to? You would take a major hit performance wise.
 
Old 07-15-2005, 04:33 AM   #3
Zeistler
Member
 
Registered: May 2004
Distribution: Slackware
Posts: 108

Rep: Reputation: 15
One more thing. Disabling the disk cache is a very bad idea because no matter how much internal memory you may have it will always get full, the reason for this being discribed above. That means that once the internal memory gets full and it always will, Linux will need to have place to put that memory page. If it doesn't have virtual disk memory where it can put it, it will be forced to kill processes who uses a lot of memory just to free space.

This creates major instabillity and danger.

How can you have a disk cache if you don't have a disk by the way????
 
Old 07-15-2005, 09:20 PM   #4
sunsfcn
LQ Newbie
 
Registered: May 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your answer.I have 2M flash and 8M SDRAM.I use RAMDISK for root filesystem.When I use Top command ,I find that Cached Memory takes a lot , about 2 MB.I also find it in the /proc/meminfo file.I known I have no hard disks.And I don't know what the Cache memory uses for.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
badblocks vs. disk cache? gd2shoe Linux - Hardware 22 12-25-2010 07:35 AM
clear or disable file cache acristescu Linux - General 3 11-04-2005 10:25 AM
I had to disable the L2 external cache (512 K) pistachio Linux - Hardware 2 07-30-2005 12:19 PM
disk cache emer_son Linux - Newbie 1 08-25-2004 07:47 PM
flushing disk and cache spejbl02 Programming 3 07-08-2004 01:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:31 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