mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-10-04 17:30:20 +00:00
further improve on #3329, ensure write-back is used over write-around
Suggested-by: Rick Altherr <kc8apf@kc8apf.net> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
e43b19109e
commit
738dc81cba
@ -3326,8 +3326,12 @@ sub config_to_command {
|
||||
$size_str = ",size=" . (-s $ovmf_vars);
|
||||
}
|
||||
|
||||
# on slower ceph clusters, booting without cache on efidisk can take a while, see #3329
|
||||
my $cache = $path =~ m/^rbd:/ ? ',cache=writeback' : '';
|
||||
# SPI flash does lots of read-modify-write OPs, without writeback this gets really slow #3329
|
||||
my $cache = "";
|
||||
if ($path =~ m/^rbd:/) {
|
||||
$cache = ',cache=writeback';
|
||||
$path .= ':rbd_cache_policy=writeback'; # avoid write-around, we *need* to cache writes too
|
||||
}
|
||||
|
||||
push @$cmd, '-drive', "if=pflash,unit=0,format=raw,readonly=on,file=$ovmf_code";
|
||||
push @$cmd, '-drive', "if=pflash,unit=1$cache,format=$format,id=drive-efidisk0$size_str,file=${path}${read_only_str}";
|
||||
|
@ -10,7 +10,7 @@
|
||||
-daemonize \
|
||||
-smbios 'type=1,uuid=3dd750ce-d910-44d0-9493-525c0be4e688' \
|
||||
-drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd' \
|
||||
-drive 'if=pflash,unit=1,cache=writeback,format=raw,id=drive-efidisk0,size=131072,file=rbd:cpool/vm-100-disk-1:mon_host=127.0.0.42;127.0.0.21;[\:\:1]:auth_supported=none' \
|
||||
-drive 'if=pflash,unit=1,cache=writeback,format=raw,id=drive-efidisk0,size=131072,file=rbd:cpool/vm-100-disk-1:mon_host=127.0.0.42;127.0.0.21;[\:\:1]:auth_supported=none:rbd_cache_policy=writeback' \
|
||||
-smp '1,sockets=1,cores=1,maxcpus=1' \
|
||||
-nodefaults \
|
||||
-boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
|
||||
|
Loading…
Reference in New Issue
Block a user