Linux – Turn off Linux file cache

cachelinux

How do I turn off write cache in Linux? More specifically, SUSE 11?

My problem is that heavy I/O kills the system even if the generating process is a user priority class, and the starved processes are RR/RT class. So my high availability system breaks with lots of timeouts.

I have / mounted on a flash drive, and a few mount points looking into a RAID controller. For the RAID, I want to try to turn the cache off, since it has a cache inside. But if it needs to be system-wide, fine.

So far I used sync option to mount, but it's not quite like turning off the cache.

Any ideas?

Best Answer

  • When mounting your hard drives use -o sync which will turn off write buffering for the drive.

    You can also set it up in your fstab:

    /dev/sda1    /    reiserfs        sync    0   0
    
  • Related Question