Page 1 of 1
Will its size extend by itself
Posted: 23. Mar 2013, 01:37
by HuaMin
Hi,
Further to this
viewtopic.php?f=6&t=54748
as the newly cloned Vbox is having its "real" size which is for instance 40GB when I view its Vdi file inside the host OS, but actually inside it, (I mean inside the guest OS), it is still having the original size like 200 GB which is the one I originally set up. Does it mean this new Vdi file will just "grow" by itself gradually?
Re: Will its size extend by itself
Posted: 23. Mar 2013, 02:14
by noteirak
That's the only possible answer, yes.
Re: Will its size extend by itself
Posted: 23. Mar 2013, 04:29
by Rootman
Not to repeat the previous brief answer, but yes it will grow in size as new data is written to it. It can only grow automatically though, there is no automatic mechanism to shrink the size if the volumes data decreases. The up side is the disks are created very quickly and take up little space till the data grows, the downside is that it takes a bit of performance while it grows and should you write a few huge files to the VDI the size stays that way till it is compacted with the vboxmanage command line utility or a third party tool like clone VDI.
Re: Will its size extend by itself
Posted: 24. Mar 2013, 10:54
by HuaMin
Thanks Rootman. After the clone using CloneVDI, the vdi file of the VBox is just with the exact "size" for its inside stored OS; this means for instance, if I I originally had 200 GB fixed size for the VBox, from which the current Vbox is copied, and the current Vbox is having 160 GB of space inside, now the vdi file would be only 40 GB in its size (reported by the host machine).
Do you mean, if I create huge file (like the one that is 1 or 2 GB in size) inside the current Vbox, it will lead to bad performance of this Vbox?
Re: Will its size extend by itself
Posted: 24. Mar 2013, 11:32
by noteirak
There are no evidence of any difference of performance between fixed and dynamic.
So it doesn't matter which one you take, you will have the same performance.
Re: Will its size extend by itself
Posted: 24. Mar 2013, 13:16
by jorgensen
HuaMin wrote:Do you mean, if I create huge file (like the one that is 1 or 2 GB in size) inside the current Vbox, it will lead to bad performance of this Vbox?
Not 'bad' performance, but you may experience a decrease in performance.
When files are added in the guest, a dynamic vdi file will expand on the host and become more or less fragmented depending on the use of the host partition. To get performance back, you need to defragment both the guest and host partition.
Re: Will its size extend by itself
Posted: 24. Mar 2013, 14:05
by mpack
No, there is no difference in performance. If anything the dynamic format favors better performance.
Dynamic and fixed VDI use precisely the same file format. The only difference is in when the 1MB blocks, which make up the disk image, are allocated. That allocation costs a write to disk, so you either pay all of those costs up front (fixed), or you pay them only as needed (dynamic). Of course in the dynamic case you may never allocate the complete disk image, so there's a saving right there. For both cases there will be a bigger performance hit early on, but that pretty soon disappears below the measureable threshold.
Dynamic disks tend to be smaller than their fixed size counterparts. People who use "Fixed" tend to make one of two mistakes: worried about the size of the host file they tend to make the guest disk too small, leading to filesystem congestion inside the guest and poor performance. The other mistake is made by noobs who don't really understand the concept of disk space, so they go for a huge fixed size drive, and then wonder about the congestion and poor performance of the host.
If you want good all round performance then dynamic is the only way, with occasional tidy-ups using CloneVDI if you really care.
Re: Will its size extend by itself
Posted: 25. Mar 2013, 06:18
by HuaMin
Thanks a lot to all.
If the host is Win 7 machine, is it enough for that we use Disk Defragmenter to resolve any fragmentation inside either host or guest?
Re: Will its size extend by itself
Posted: 25. Mar 2013, 11:53
by mpack
A defragmenter running on the host will only defragment the host filesystem. Nice to do every now and then (I do it once every 6-8 months) but not a complete solution.
Two other things can become fragmented:
1. The order of the 1MB image blocks in the VDI can be non-linear in a dynamic VDI.
To fix this you can run CloneVDI (with keep-uuid option) when the VDI has reached a stable size. It isn't worth doing before then.
2. The guest filesystem can also become fragmented.
Fix that by running a defragmenter inside the guest.
Re: Will its size extend by itself
Posted: 26. Mar 2013, 03:27
by HuaMin
Thanks. Where is "keep-uuid" option?
Re: Will its size extend by itself
Posted: 26. Mar 2013, 11:29
by mpack
Read the CloneVDI release notes.
Re: Will its size extend by itself
Posted: 26. Mar 2013, 11:46
by HuaMin
Sorry, I cannot find out the details of it, from this
viewtopic.php?f=6&t=22422
Re: Will its size extend by itself
Posted: 26. Mar 2013, 11:54
by mpack
You have already read the CloneVDI release notes - or you should have since you've been asked to do so in previous threads - so I think we're done here. Topic locked.