[PVE-User] Slow performance on qcow2 disk when almost full
adocampo at dltec.net
Mon May 2 16:38:54 CEST 2016
I'm having troubles with a Windows 2K8R2 VM with a qcow2 file as C:\. It has a 100GB disk it has arrived almost at 100% (97GB).
The thing is now is damn slow. I know *any* disk over 90% of its capacity degrades itself so I hotplugged another disk only to discard something related to the virtualization, drivers, etc.
The empty disk works as expected, copy-pasting a folder from/to the empty disk, it writes at 90MB/s (so reading and writing at the same time must be greater than 100MB/s which is fine)
On the almost full disk, copy-pasting the same folder from/to the full disk, the speed is 2MB/s.
I decided to grow the disk, and give to it 100 extra more GB. So I did a
qm resize <id> <disk> 200G
And quickly it resized it to 200GB. After entering windows and extend the volume, now I have 105GB free storage, but it continues slow...
Now I'm doing a windows defrag, which says is at 51% fragmented... I guess when it completes it should be as fast as before.
Now my questions:
- I pointed directly to the few space left on disk C:, but perhaps you faced something similar.
- proxmox creates qcow2 as sparse files, I did read you can pass to qemu-img create the preallocation=full in order to preallocate the qcow2 file into continuos sectors on the physical drive, but it seems there is no option to once created, set it as preallocated, so I did a qemu-img convert -o preallocation=full -f qcow2 source.qcow2 destination.qcow2, did I right?
- Anyway, after converting, I did resized the disk as explained before, and it tooks no time to convert it, so it didn't preallocated anything.
- My guess is I must do a qemu-img convert once again in order to preallocate the space but is a long process and I don't know if I would gain anything, because qcow2 fragments itself by definition. Perhaps using a raw disk will improve performance over time (when the disk is empty, both raw and qcow2 has the same performance, so I selected qcow2 mainly to make online backups)
Sorry for being so disperse, I do not know exactly if the problem I have comes because the space left on device, fragmentation, disk preallocation, disk type.... so any advice would be great... just to mention I'm on gluster over ZFS bricks, so I have pretty good performance.
[cid:part1.0BE817FA.DB26AA18 at dltec.net]
Datalab Tecnologia, s.a.
Castillejos, 352 - 08025 Barcelona
Tel. 93 476 69 14 - Ext: 114
More information about the pve-user