0

I'm looking to run monero inside a ubuntu virtualbox vs having it run in the open with other apps around. From a security perspective, this should be safer. Since I'm not mining, what performance issues would I run into? I can see the vbox image would be over 30gb due to the blockchain size. Any way to reduce this aswell?

2

Running any program inside a VM comes with a slight-to-moderate hit in performance. It really depends on how you set things up both on the host computer and inside the client OS. You say you want to use VirtualBox so I am going to assume you're going to run and configure the VM via the GUI and not do anything special with it.

If you're going to run Ubuntu (Desktop I'm assuming again) you're going to need at least 2 CPU cores and 2GBs of RAM for a decent user experience. On top of that you will need to have a big virtual hard drive to contain the blockchain. As of 20 september 2017 my chain is 28.5GB and still growing (I was a bit late with updating the daemon). You would need at least another 10GB for Ubuntu itself. That number includes spare space for future updates/patches and a small swap space). I would recommend to make a virtual disk file of at least a 100GB so that you won't have to do anything complicated to grow your disk file soon. I know from personal experience that writing and reading to this disk file is pretty much on par with that of a real drive.

As far as performance goes you won't really notice the two shared CPU cores. You will notice the 2GBs of always allocated RAM, or rather the lack thereof, as that's a big chunk of RAM for most computers. It will cause more swap usage on the host as less RAM is available for buffering files and such. The disk space is gone either way, whether the chain is stored inside the VM or on the host it does not matter: 28GB is 28GB. Ubuntu itself pales in comparison to the size of the blockchain so I just leave that out of the equation. The disk IO for the blockchain is small enough that you won't really notice it. Especially not if you're using an SSD. You probably would notice some delays in the host if you use a regular hard drive and if the host itself also does a lot of disk IO.

Now monerod itself uses (very) roughly around 20% of the Athlon X4 620 I'm using to power my miner. This will be much less on more modern CPUs. It also uses around a 100MB of RAM and the combined reads/writes are less than 2MB per second from/to the drive. That's nowhere near breaking point for any recent hardware.

So, running a monero node inside a VM is perfectly possible. The VM itself is absolute overkill though and you could save a lot of CPU power and RAM by using a container solution like LXC. If you do want to stick to VirtualBox use Ubuntu Server to ditch the heavy GUI and strip out any unneeded parts. You could probably get away with using a single core and 512MB of RAM then.

And lastly. Don't forget to turn on Intel-VTx/VTd or AMD-V (hardware virtualization) in the BIOS/UEFI. This is the single biggest performance booster for any kind of virtualization. Some computers (like the laptop I'm typing this answer on did) might need a BIOS update for the option to show up. Consult the manual of your motherboard for more information regarding this option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.