|
From: | Avi Kivity |
Subject: | Re: [Qemu-devel] [RFC] Disk integrity in QEMU |
Date: | Mon, 20 Oct 2008 16:14:42 +0200 |
User-agent: | Thunderbird 2.0.0.16 (X11/20080723) |
Jens Axboe wrote:
Use hdparm, it's an ATA drive even if Linux currently uses the scsi layer for it. Or use sysfs, there's a "cache_type" attribute in the scsi disk sysfs directory.
With this, I was able to benchmark the write cache for 4k and 128k random access loads. Numbers in iops, hope it doesn't get mangled:
4k blocks 128k blocks pattern cache off cache on cache off cache on read 103 101 74 71 write 86 149 72 91 rw 87 89 63 65Test was run on a 90G logical volume of a 250G laptop disk; using O_DIRECT and libaio.
Pure write workloads see a tremendous benefit, likely because the heads can do a linear scan of the disk. An 8MB cache translates to 2000 objects, likely around 1000 per pass. Increasing the block size reduces the performance boost, as expected.
read/write workloads do not benefit at all (or maybe a bit); presumably the head movement is governed by reads alone.
Of course, this tests only the disk subsystem; in particular, if some workload is sensitive to write latencies, the write cache can reduce those in a mixed read/write load, as long as the cache is not flooded (so loads with a lower percentage of writes would benefit more).
-- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
[Prev in Thread] | Current Thread | [Next in Thread] |