VBox 5.0.24r108355 disk performance on a ram drive
Posted: 19. Jul 2016, 19:08
let's not...
=========
... talk about the risks, the usage or the sense of all this. RAM drives are volatile; I know, and I've got a solution and true use for this. : )
If you want to reply "get yourself an ssd", please be told that an ssd produces the same results in VirtualBox as my ram drive: Something appears to step on the brake when storing bigger files in a vdi.
issue:
======
drive access for > ~100 MB files quite slow, even if the VDI is on a ram drive
given environment:
=================
VBox version: 5.0.24r108355
OS: Windows 7 up to 10 & Linux Gentoo & CentOS
CPU: 12 core (6 true + 6 hyper threading) Intel CPU for the Windows machine, 12 core Opteron for the Linux machine
RAM: 64 GB
description:
===========
Dear forum,
I couldn't find anything existing, so I thought I ask. Maybe somebody has already found a solution for himself.
Operating a guest on a VM using a VDI file appears to have very fast access for small files and quick accesses, but when writing big files, the whole transfer process becomes quite slow, like on a physical disk drive.
To give you an idea about what the relations are, I've ran a couple of tests and benchmarks:
small files some few kbyte up to ~100 MB --> transfer rates of 2330 MB/s
big files ~100 MB and above --> transfer rates of 104 MB/s (like a good old physical SATA1 drive)
I've tested this on two machines with the same type of RAM, a Windows host, and a Linux host.
For Windows I'm using the free tool "OSFMount" (tested others as well, but same outcome).
My Linux box is running the current CentOS using tmpfs to realise the RAM disk. (VMs are in headless operation)
Both RAM drives are set to 50 GB. Smaller drive sizes produce equal results.
test scenarios:
=============
Windows host (tested Win7 up to win10) all drives using ntfs
1) copied files from one vdi to another vdi (both on the same physical ram drive)
2) copied files from one vdi to another vdi (both on a different physical ram drive)
3) copied files from one vdi to the same vdi (both on the same physical ram drive)
4) copied files from one vdi to the same vdi (both on a different physical ram drive)
5) ran a disk benchmark utility
6) defragmented the disk (defragmenting the physical ram drive is MUCH MUCH faster than when defragmenting a VDI running that same VDI file which is ON a ram disk)
7) OS boot speed is excellent with a VDI on a ram drive, much faster than on the physical HDD. (any windows version) - up to 15 seconds faster on the desktop!
Linux host (tested with the current Gentoo Linux and the current CentOS) all drives using ext4
1) copied files from one vdi to another vdi (both on the same physical ram drive)
2) copied files from one vdi to another vdi (both on a different physical ram drive)
3) copied files from one vdi to the same vdi (both on the same physical ram drive)
4) copied files from one vdi to the same vdi (both on a different physical ram drive)
5) (does only apply for Gentoo Linux) running through emerge --sync (many maaany small files being deleted and written) within seconds when the vdi is on a ram drive. Using a vdi on a physical disk drive, the same procedure takes minutes.
So.... for me it looks like something that is not hardware dependant is stepping on the brake when storing big files.
Could this be the emulated CPU power used to calculate the changes for the file system? Or is it the write process itself? Thinking it could have something to do with CPU calculations as those are emulated, not handed over to the "real" CPU?
Thanks for posting your ideas!!
=========
... talk about the risks, the usage or the sense of all this. RAM drives are volatile; I know, and I've got a solution and true use for this. : )
If you want to reply "get yourself an ssd", please be told that an ssd produces the same results in VirtualBox as my ram drive: Something appears to step on the brake when storing bigger files in a vdi.
issue:
======
drive access for > ~100 MB files quite slow, even if the VDI is on a ram drive
given environment:
=================
VBox version: 5.0.24r108355
OS: Windows 7 up to 10 & Linux Gentoo & CentOS
CPU: 12 core (6 true + 6 hyper threading) Intel CPU for the Windows machine, 12 core Opteron for the Linux machine
RAM: 64 GB
description:
===========
Dear forum,
I couldn't find anything existing, so I thought I ask. Maybe somebody has already found a solution for himself.
Operating a guest on a VM using a VDI file appears to have very fast access for small files and quick accesses, but when writing big files, the whole transfer process becomes quite slow, like on a physical disk drive.
To give you an idea about what the relations are, I've ran a couple of tests and benchmarks:
small files some few kbyte up to ~100 MB --> transfer rates of 2330 MB/s
big files ~100 MB and above --> transfer rates of 104 MB/s (like a good old physical SATA1 drive)
I've tested this on two machines with the same type of RAM, a Windows host, and a Linux host.
For Windows I'm using the free tool "OSFMount" (tested others as well, but same outcome).
My Linux box is running the current CentOS using tmpfs to realise the RAM disk. (VMs are in headless operation)
Both RAM drives are set to 50 GB. Smaller drive sizes produce equal results.
test scenarios:
=============
Windows host (tested Win7 up to win10) all drives using ntfs
1) copied files from one vdi to another vdi (both on the same physical ram drive)
2) copied files from one vdi to another vdi (both on a different physical ram drive)
3) copied files from one vdi to the same vdi (both on the same physical ram drive)
4) copied files from one vdi to the same vdi (both on a different physical ram drive)
5) ran a disk benchmark utility
6) defragmented the disk (defragmenting the physical ram drive is MUCH MUCH faster than when defragmenting a VDI running that same VDI file which is ON a ram disk)
7) OS boot speed is excellent with a VDI on a ram drive, much faster than on the physical HDD. (any windows version) - up to 15 seconds faster on the desktop!
Linux host (tested with the current Gentoo Linux and the current CentOS) all drives using ext4
1) copied files from one vdi to another vdi (both on the same physical ram drive)
2) copied files from one vdi to another vdi (both on a different physical ram drive)
3) copied files from one vdi to the same vdi (both on the same physical ram drive)
4) copied files from one vdi to the same vdi (both on a different physical ram drive)
5) (does only apply for Gentoo Linux) running through emerge --sync (many maaany small files being deleted and written) within seconds when the vdi is on a ram drive. Using a vdi on a physical disk drive, the same procedure takes minutes.
So.... for me it looks like something that is not hardware dependant is stepping on the brake when storing big files.
Could this be the emulated CPU power used to calculate the changes for the file system? Or is it the write process itself? Thinking it could have something to do with CPU calculations as those are emulated, not handed over to the "real" CPU?
Thanks for posting your ideas!!