[PVE-User] HDD errors in VMs

Michael Pöllinger m.poellinger at wds-tech.de
Fri Jan 8 00:16:14 CET 2016


> Since you use RAID controllers (I assume with BBU) try using proxmox
> cache setting 'write through' or 'directsync'. Read here:
> https://pve.proxmox.com/wiki/Performance_Tweaks

> Default mount options for ext4 in debian 8.2: type ext4
> (rw,noatime,data=ordered)

> You could try: rw,noatime,data=ordered,barrier=1

Hi Michael.

Thanks for your advices.

If i understand barriers correctly barrier=1 is for more data safety and on
the other side with  ap. 3% loss in speed.
VMs are tested with write-through and none -> resulting in same errors.

Ok now i think write-through is the speed worst cache due to perma flush
	
As mentioned from RedHat
This nobarrier or barrier=0 setting should only be set on host systems and
should never be used inside the VMs itself:
->
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/htm
l/Storage_Administration_Guide/writebarrieronoff.html

Ok i now got that in ext4 barrier is enabled by default if nothing is
specified in mount options:
https://www.kernel.org/doc/Documentation/filesystems/ext4.txt

"When comparing versus ext3, note that ext4 enables write barriers by
default, while ext3 does not enable write barriers by default."

So to answer your question, barrier should be on already

Sorry for my wired thinking. It´s to much for me today :P

====================

Due to ZMCP (non-volatile Flash covered cache) following cache settings
should be best and safe together

Settings on Raid-Controller (default):
Write-cache mode   : Enabled (write-back)
Write-cache setting : Enabled (write-back) when protected by battery/ZMM

Settings in host-system:
Barrier on by default (could be turned off, due to non-volatile raid-cache)

Settings for guest:
!!! iothread = on !!!   ->
https://wiki.mikejung.biz/KVM_/_Xen#virtio-blk_iothreads_.28x-data-plane.29
cache = writeback
barrier per default on
BUS=virtio
SCSI-Controller-Type: default (LSI 53C895A)

Next test could be switching to:
BUS=SCSI
SCSI-Controller-Type: virtIO

PS: iothread is off per default

I´ll give you an update as soon as possible.

@ Emmanuel
If i don´t find the bug, be prepared that we´ll start a ticket ;)

Kind regards
Michael






More information about the pve-user mailing list