LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


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

Rep: Reputation: 102Reputation: 102
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)

Code:
[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.

Code:
[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
hellfire911
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Rep: Reputation: 0
about O_DIRECT option of bonnie

Quote:
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
maryl
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:

Code:
dd if=$FILENAME of=/dev/zero bs=$BLOCKSIZE count=$BLOCKCOUNT iflag=direct
 
Old 01-21-2016, 03:59 AM   #19
mayurdjain
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!
-Mayur
 
Old 01-21-2016, 09:18 AM   #20
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,151

Rep: Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203
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
mayurdjain
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 http://comments.gmane.org/gmane.linu...lnewbies/14914, 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.
<code>
#define L1_CACHE_BYTES 0
</code>
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!
-Mayur
 
  


Reply

Tags
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


All times are GMT -5. The time now is 02:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration