[pve-devel] [PATCH qemu-server] qcow2: increase cache-size to 1GB

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Thu Aug 14 16:14:34 CEST 2025


some more tests with 1TB lvm qcow2:
------------------------------------

current patch

main image cluster_size=64k 
--------------------------------------------------------
cluster_size=64k cache-size=1GB: 
read 4k : 40k iops
write 4k: 25k iops
          	                       
+ 1 snapshot cluster_size=128k+suballocated, cache=size=1G:  
read 4k : 40kops iops
write 4k: 25k iops




main image cluster_size=1MB 
------------------     -----------------
cluster_size=1MB cache-size=32mb: 
read 4k : 40k iops
write 4k: 25k iops
---> bigger cluster need less cache
                       
+ 1 snapshot cluster 128k+suballocated, cache-size=32MB:     
read 4k : 3500 iops
write 4k: 2500iops
---> still not enough cache for 128k
 
  
cluster_size=1MB cache-size=1G: 
read 4k : 40k iops
write 4k: 25k iops
                       
+ 1 snapshot cluster_size=128k+suballocated, cache=size=1G:  
read 4k : 40kops iops
write 4k: 20k iops
---> enough cache  , performance are correct                          
                                  
                                  
cluster_size=1MB cache-size=32MB: 
read 4k : 40k iops
write 4k: 25k iops
                       
+ 1 snapshot cluster_size=1MB+suballocated, cache=size=32MB:     
read 4k : 40kiops
write 4k: 3000iops

---> write performance are bad with big cluster size for snapshot


cluster_size=1MB cache-size=1GB: 
read 4k : 40k iops
write 4k: 25k iops
                       
+ 1 snapshot cluster_size=1MB+suballocated, cache=size=1GB:     
read 4k : 40kiops
write 4k: 3000iops

---> write performance are bad with big cluster size for snapshot (even
with bigger cache)



So, snapshot really need small cluster size for good write performance,
to avoid big copy on write of backing image

Main image could have bigger cluster size, but I'm not sure of the
impact if // write occur on a specific cluster, maybe they could have
some kind of lock contention




some bench with enable sub allocated cluster on main image:

main image suballocated cluster_size=1MB cluster
------------------------------------------------
1MB cluster sub allocated 32mb cache : read 4k : 30k iops
                                       wirte 4: 6k iops
                                       
                                       
1MB cluster sub allocated 1GB cache : read 4k : 30k iops
                                       write 4: 6k iops
                                       

write performance is bad, better to avoid l2_extended=on on main image






More information about the pve-devel mailing list