A
A
Alexey2011-08-18 13:06:23
linux
Alexey, 2011-08-18 13:06:23

Disable file cache for one of the drives in Linux

On the server that distributes files, the disk system is built like this: 1 SATA disk + 2 SATA disks in RAID-1 + SSD disk. Installed 14 gigabytes of RAM, more than 95% percent is occupied by the Linux file cache.
Content is being distributed from the last three disks of disks (the first is system).
Lately, I've noticed an increased abnormal load on SATA drives at various times.
When copying a 300-400 megabyte file from the first disk to RAID-1, everything happens very quickly, almost at full disk speed. But at the first access to this file already on RAID-1 (for example, counting its MD5), the read speed becomes very low and the Load Average grows from 0.6 to 5-6 ... At the same time, files are being distributed from this disk, but very insignificant (no more than 10 Mbps).

I would like to make sure that the data from the SSD disk (basic traffic, about 300 Mbps) does not clog the Linux file cache and does not wash out the file cache data from SATA disks. Is there any way to set this up? Used Ubuntu Server 10.04 x64 with kernel 2.6.32-33-server. SSD and so cope, without a cache, that would be to remove it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
V0Vka, 2011-08-18
@alexxxst

In my opinion, if you mount the file system from an SSD disk with the sync option:
mount -o sync,noatime /dev/ssd-disk /mountpoint
, this fs will not be cached.
noatime - so that each time information about access to each file is not recorded. This will greatly extend the life of the SSD.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question