Debian_SuperUser
Active Member
Just for experimental purposes, I want to try completely disabling any memory caching that goes on at runtime. Only memory that is really needed should be allocated. Is something like this possible?
If you're referring to caching as seen inJust for experimental purposes, I want to try completely disabling any memory caching that goes on at runtime
htop
(orange memory bar), that's file cache, files loaded into memory instead of being read from disk.can't help with that but know that caching is a good thing for performance, you might end up releasing some memory but degrading performance.Right now, I am referring to the cache numbers showed in gnome system monitor.
Well stopping caching is oposite of performance. Usually making system use all RAM is what one wants. Free RAM is just free RAM. Pretty useless. There are some options with kernel for embedded systems that may help though. I never tested them so not sure if this will help. Nevertheless re-compiling modified kernel is one way to go.
Windows will hide a ton of things from you because MS doesn't want to confuse users with technical stuff,It may not matter, as on Windows, and it seems even more on Linux, the concept is preferred by the vendor, so they won't make it look like you don't need any caching.
There are different types of caches that the linux kernel controls and they are not all controllable from user space. I'm not familiar with gnome system monitor, but the size of the caches in memory which are provided for users' information are in the file: /proc/meminfo like so:@osprey
Drop caches is something I can do, but it just clears some type of cache, so not even all cache, and I want to completely disable caching rather than clearing it every time. Just for experimental purposes of course.
@CaffeineAddict
Right now, I am referring to the cache numbers showed in gnome system monitor.
[tom@min ~]$ grep -i cache /proc/meminfo
Cached: 1191624 kB
SwapCached: 0 kB
This just mean that you do not understand the difference between CPU and RAM usage or worse how computer hardware works.To this day I still can't understand the logic of memory caching.
For me, caching is a good solution, for underpowered machines. That means, machines low on memory. Or, high on usage, you can also look at it this way.
I don't get the concept of : not all memory is used, we can't do that, we must fill the memory with whatever we can find, so that it is full, and then we need to find a solution to carry on, despite all memory being used.
For me, memory is a capacity. Like the top speed of your car. You can go that fast, but if you don't, you don't, end of story.
I don't buy a CPU so that my CPU usage is constantly at 100%, because then "I'm using it".
I buy a CPU to NEVER get to 100%. Same for memory. I buy these for the option to never run out.
Disk is different, as disk is storage and you can move storage.