Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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 ??
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:
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.
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.