Optimizing the page cache space for less memory utilization in some system where systems don't have swap space and external flash drive or hard disk. Is there any possibility that if we can remove or optimize the page cache size in kernel data structure?

  • Have you observed a particular instance where the page cache size is inefficient, that you could add into your question detail ? – steve Sep 29 '15 at 10:35
  • kernel running on devices like routers, switches not having swap space and kernel running on small devices not having any flash drive or hard disk can be some example. – LinuxLerner Sep 29 '15 at 10:58

Yes. Tuning vm.dirty_background_ratio and vm.dirty_ratio will effectively reduce the page cache size.

More info at Better Linux Disk Caching & Performance with vm.dirty_ratio & vm.dirty_background_ratio

  • 1
    No; those cause the kernel to write dirty pages to disk more frequently, but not to remove clean ones from the cache. You want vm.swappiness set to zero. – psusi Sep 29 '15 at 14:37
  • I have already tried this stuff but even after doing this and dropping the cache i.e. echo 3 >> /proc/sys/vm/drop_caches still in cache there remain around 180 MB is there any way to reduce the cache size further? – LinuxLerner Sep 30 '15 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.