Virtual Machine Jail Processor Usage

Status
Not open for further replies.

fricker_greg

Explorer
Joined
Jun 4, 2016
Messages
71
Hey guys, first post, long time creepy window watcher searching this forum and RingTFM. I have been searching over the past couple days and have not been able to figure out the answer to this question.

Since a virtual box instance is running out of a jail, shouldn't it not be able to over provision resources?

For example, I have a Plex jail, a virtual box jail for Mythbuntu, and am considering making another virtual box jail to be a transcoding virtual machine that watches a folder for my Bluray rips and for my recorded TV via Mythbuntu.

In the mythbuntu virtual box, I have limited this machine to 4 out of 8 CPUs (i guess it counts threads). This has seemed very reasonable for what is not a very challenged machine. Does this entirely rob the base OS of freenas of these cores? I assume no as this is all running in a jail and using the same kernel.

I am considering making a transcoding VM that just looks at a folder and transcodes it out. I would like to assign more cores to this machine so that it can chomp on through, but I do not want to ruin my box, obviously. When I allocate processing cores to this VM, should I assign it 6-8 cores out of 8?

While none of my jails or VMs are typically not doing a whole lot at the same time and I have never seen CPU use above 40% (when I was transcoding in the mythbuntu VM), I don't want to over provision resources. Does virtual box cpu allocation entirely rope off those cores? If I assign all the cores (8/8), does that rob Freenas of resources such that it has none? Would a scrub run at a higher priority than something in a jail?

The bottom line is that I don't want to be caught with my pants down if I am running a transcode during one of my bi-monthly scrubs (thanks for the mock schedule Cyberjock). So

To get it out of the way, I run the following system with the drives in a single raid z2 array (one vdev):
Mobo: Supermicro x9SRH-7TF
CPU: Xeon e5-1620 v2 with a large noctua cooler (4c, 8T)
ECC RAM: 48 GB (soon to be 64GB)
Drives: 6 x 4TB WD RED
PSU: Corsair AX 760
Case: Define R5

server has files, pictures, as well as media.

Thanks again to all, I really appreciate the help.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
If I understand you correctly you are asking for an educated guess on if you create a VM which you expect to pull a lot of resources, if it will cause an issue with a scrub, or the scrub cause an issue while you are transcoding.

I have a question: What do you mean by a transcoding VM? Are you saying that you will be automatically converting the format of a video to another format or that you are actively transcoding a stream for viewing?

If you are just doing a format conversion then no big deal.
If you are trying to watch a video then a scrub should just become very slow.

The problem is our educated guess is just that, a guess. You will need to set it up and try it yourself. You can always just create your transcoding VM and make it do whatever you plan for it to do and manually start a scrub to see what the impacts are.
 

fricker_greg

Explorer
Joined
Jun 4, 2016
Messages
71
First off, thanks for the reply.

By transcoding VM, I mean one that will convert file formats when I queue it all up.

I guess my real question is, when I assign cpu cores to the virtual box virtual machine in the phpvirtual box settings, is this removing the cores from the base OS or from other jails? would there be any issues if I assigned all the cores to all the jails? If I assign 4 cores to one phpvirtualbox virtual machine, are there only 4 cores left on my machine for freeness duties and any other jails?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
when I assign cpu cores to the virtual box virtual machine in the phpvirtual box settings, is this removing the cores from the base OS or from other jails?
No.
would there be any issues if I assigned all the cores to all the jails?
Technically it should work fine however I don't believe it's good practice to assign all the cores to a single VM.
If I assign 4 cores to one phpvirtualbox virtual machine, are there only 4 cores left on my machine for freeness duties and any other jails?
No, the CPU cores are not exclusively assigned to the VM, things are properly time managed.

My advice as for determining how many cores/threads to assign a VM should come from what the applications require in order to do a reasonable job. Some software is single threaded so you only need 1 core. In general I would assign 1 core to start with but if you have something which you feel would accelerate with more cores and you desire the process to be speedy, then assign more cores. I personally would never assign more than half of my cores to a VM. I know in the distant past you could cause the host machine to become not as responsive as you would like. You never talked about RAM sizing which I would feel was a more important topic but as long as you ensure you leave some RAM for FreeNAS, you should be good. Things will get slower if you have to cache your data to the SWAP file.

You have a lot of questions about virtual box so I would suggest you visit a virtual box forum and see what they can offer up as well.
 

fricker_greg

Explorer
Joined
Jun 4, 2016
Messages
71
Thanks for all the help, I really appreciate it. I'm only provisioning away 8 GB of ram from my 48 on a 16TB pool with <5 users at gigabit. I will be upgrading to 64 GB by the weekend, so it should be even less of a concern. Thanks again.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
A jail is just a container for userland processes like "ls" or "vi". The fact that Virtualbox is doing something very much more complicated than "ls" is mostly irrelevant. Do note that this says nothing about causing problems of the reverse sort. Overallocating resources to a Virtualbox process could cause poor performance for the VB, plus it may strain the host system especially for things like memory.
 
Status
Not open for further replies.
Top