]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
avoid the buffer cache when copying volumes
authorPádraig Brady <pbrady@redhat.com>
Fri, 13 Jul 2012 17:22:17 +0000 (18:22 +0100)
committerPádraig Brady <pbrady@redhat.com>
Thu, 6 Sep 2012 19:37:41 +0000 (20:37 +0100)
commitd9b8a5189fa9adf4308bf492dcf6537ba2b75311
tree8a1d6cb813f0c88a5efca7186fc205d854e6704d
parent5d72e7a40e49e6d69e6733b2564dcfc08f398bd1
avoid the buffer cache when copying volumes

The dd process when clearing volumes, was seen to starve
the system when writing to an iSCSI SAN connected over GigE.

So use O_DIRECT within the dd process so that the system
buffer cache is not impacted, which is generally the
best thing to do when streaming large amounts of data.

Also one could drop the I/O priority of the dd process
by prepending "ionice -c3". That would change the priority
from "normal" (best effort) to "idle", which means zeroing
will only proceed when there is no other I/O on the system.
It was thought best to leave scheduling decisions to the
system however, rather than specifying them explicitly.

Fixes bug: 937694
Change-Id: Ic842d7b83209c41d8ff05075990ed12e6f86283a
cinder/volume/driver.py