|
From: | Stanislav German-Evtushenko |
Subject: | Re: [Qemu-discuss] drive cache=writethrough without flushing to physical disks OR drive cache=none with readonly host cache |
Date: | Mon, 3 Mar 2014 01:29:25 +0400 |
1) simply use the writethrough cache and configure your battery backupped RAID card to ignore fsync requests (warning, you really _need_ a battery backupped RAID card or corruption / data loss will happen in case of a power failure). In this manner, you can use the OS-provided read cache, while passing all writes directly to the RAID card (wich will ignore the fsync requests attached with them). The problem is that the writethrough config will impose a big overhead on the OS (fsync are not cheap, even when the hardware ignore them), resulting in low performance anyway (probably).
2) with relatively recent Qemu versions (CentOS 6+), you can use the writeback cache, enable write barriers on the guest OS and configure your battery backupped RAID card to ignore fsync requests (the same warning apply: to safely configure your RAID cache as a writeback one, you _need_ a battery backupped card). With write barrier enabled on the guest side, you are sure that important writes will be synched to the RAID cache (as Qemu will pass the relative barriers to the underling OS), while the host will cache any read requests.
[Prev in Thread] | Current Thread | [Next in Thread] |