Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 07-03-2009, 03:59 AM   #16
Senior Member
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Unhappy Unable to find file /proc/sys/vm/drop_caches

I am unable to find this file /proc/sys/vm/drop_caches on Red Hat Enterprise Linux AS release 3 (Taroon Update 5)

[root@ussdcluster1 vm]# sync; echo 3 > /proc/sys/vm/drop_caches
-bash: /proc/sys/vm/drop_caches: No such file or directory

[root@ussdcluster1 vm]# ls -l /proc/sys/vm/drop_caches
ls: /proc/sys/vm/drop_caches: No such file or directory
I need to clear cache mem which is in bold.

[root@ussdcluster1 vm]# free -m
             total       used       free     shared    buffers     cached
Mem:          3936       3915         20          0        221       3051
-/+ buffers/cache:        643       3293
Swap:         6000          0       6000
I know this is not a problem actually, But as per customer requirement I need to do this
Old 03-05-2011, 01:32 AM   #17
LQ Newbie
Registered: Dec 2010
Posts: 6

Rep: Reputation: 0
about O_DIRECT option of bonnie

Originally Posted by trailman View Post
Yes, you're right ! ... and at the end I used bonnie++ 1.03e for my bench.
I've used the option for the O_DIRECT mode
I get nearly the same bench results than with my previous bench script.
Hi, it seems that bonnie++ doesn't have O_DIRECT mode, how did you do that ??
Old 07-09-2013, 12:33 PM   #18
LQ Newbie
Registered: Jul 2013
Posts: 1

Rep: Reputation: Disabled
Sorry for digging this out, but this might be useful for the future generations. If you use dd for testing bandwidth, you should use the 'direct' flag to bypass filesystem cache, so an example dd would be like this:

dd if=$FILENAME of=/dev/zero bs=$BLOCKSIZE count=$BLOCKCOUNT iflag=direct
Old 01-21-2016, 03:59 AM   #19
LQ Newbie
Registered: Nov 2015
Posts: 4

Rep: Reputation: Disabled
I wanted to check the app r/w performance on android phone. Once the app is launched, its data will be cached and relaunching of app will be from the cached data.
Is there a way in kernel code to disable the cache so that application will never be launched or relaunched from the cache. It will be great if some one can help or provide pointers to move forward.

Thank You!
Old 01-21-2016, 09:18 AM   #20
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171
The problem is, if you do disable caching, you bring a system to its knees. You can never meaningfully "disable caching" on a phone, anyway, because "everything's 'in memory' somewhere." (The difference is that some phone memory is "slow.")

Generally, all applications consist of two parts: the (immutable) code segments, and the (per-process) data area. The code segments can be shared and cached; the data area is unique to the process instance and is discarded when the process ends.

If you disabled a filesystem cache, on a non-phone device, you would force every disk write not to be "lazy," and the system would grind to an unusable halt.
Old 01-22-2016, 04:49 AM   #21
LQ Newbie
Registered: Nov 2015
Posts: 4

Rep: Reputation: Disabled
Thank you very much for your reply. I agree with your comment and if we disable kernel cache it will bring down the system. But still how we can disable kernel cache?

As per thread on kernelnewbies, we can tweak L1 and L2 cache via "include/asm-i386/cache.h",

by setting L1_CACHE_BYTES to zero will disable cache but not sure, not yet tried and not sure how to verify.
#define L1_CACHE_BYTES 0
For applications, we can clear Application cache and data from phone settings and also clear inode, dentries and page cache using drop_cache.

As there are so many caches, I am getting confuse, really what all caches will be responsible for an application and how to make sure everytime application start we have cleared all the caches in case of android mobiles.

Thank you!


cache, filesystem

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
disable cache in browser ? ini_hendry Linux - Server 1 01-15-2008 04:43 PM
Disable Cache ?? Ameii83 Linux - Server 5 11-28-2006 09:12 PM
how-to disable cache squid paul_mat Linux - Networking 2 12-22-2005 12:32 AM
clear or disable file cache acristescu Linux - General 3 11-04-2005 11:25 AM
Is it possible to disable the disk cache? sunsfcn Linux - Software 3 07-15-2005 10:20 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

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

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