i'd like to run a fileserver in a virtual machine. the block device is a
real device and no file. in the UML kernel there is a block device sync mode,
which is enabled by default. the problem is: its very slow :-(
now i run in asyncron mode, which is faster, the question is: ist it safe,
well how safe is it?
as i understand it is cached 2 times one time by UML an the second time by
the host kernel. so it's more dangerous in a crash situation.
is it possible to disable the UML cache (if there is one) an have like a
pipe through block device?
armin@... pgp public key on request CU
From: Steve Schnepp <snide@fr...> - 2003-02-26 07:46:52
On Wed, Feb 26, 2003 at 12:19:21AM +0100, Armin Obersteiner wrote:
> now i run in asyncron mode, which is faster, the question is: ist it safe,
> well how safe is it?
short answer : as safe as the host is.
long answer : sync mode affects only the layer between the UML and the
host. There's always some async happening inside the UML anyway.
> as i understand it is cached 2 times one time by UML an the second time by
> the host kernel. so it's more dangerous in a crash situation.
short answer: Yes and No.
long(er) answer : It depends all on what u mean by dangerous. I
personally prefer to have a consistant filesystem that has the last
writings lost, than a more "bleeding edge" one, with many files
corrupted (with writings almost done). That's IMHO the basic concept of
journal in filesystems
> is it possible to disable the UML cache (if there is one) an have like a
> pipe through block device?
That should be in a sort of FAQ (that has still to be written ;-) ).
Disable brutally the UML cache isn't a good idea (it goes agains the
whole VM layer of Linux.) But making the VM layer smarter (and aware of
host memory pressure) is by far a better idea, although not so easily
implemented. A complementary move that would (IMHO) be easier to
implement (and is more likely to happen) is to mmap(2) the ubd devices.
GPG public key available from http://snide.free.fr/gpg/snide-free.fr.asc
Or by email to "snide at free.fr" with "send key pub" as subject
Fingerprint: 91E3 C5F1 2641 4D0F EDD0 7116 D187 5929 14A8 FDA2