FreeNAS 9.10 on ESXi 6.0 - Cores vs Sockets

Status
Not open for further replies.

Scharbag

Guru
Joined
Feb 1, 2012
Messages
620
I have a performance question: Is it better to present 1 vCPU with 4 cores to FreeNAS or 4vCPUs with 1 core each? Or does it matter to FreeBSD?

Cheers,
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
While I don't think it matters, if there is a preference then I'd like to know as well and why. For myself, I give it one vCPU with 2 cores. I think I read a while ago that 3 cores was optimum at the time for FreeNAS but it depended on what you were doing with it. Meh, bad memory at times.
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
As a data point, I elaborated with limiting by CPU Mhz rather than full cores to each VM.
The reasoning was to allow both cores (i3-6100) to join in where it might be needed most. Thinking about Mhz capacity as a way to evenly distribute 'shares' of power at a finer granularity than a socket each, a core each.
However! the downside became apparent when (without caution) migrating the VMs to another physical host which did not have similar CPU power. This caused FreeNAS to crash. Don't to that.
I'd definitely not recommend this setup.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
I have never limited my CPU speed to any of my VMs but with FreeNAS the only change I did do was to lock the 16GB of memory. While I know FreeNAS can work without locking the RAM, I also know there is risk without the lock and since I have 64GB RAM in my machine, well it was planned from the start to give it the full 16GB. Also, I have never seen my FreeNAS system VM or Metal, use much CPU horsepower, even when transcoding. Of course I don't run but one jail for Plex so it's not like I need a lot of CPU in the first place.
 

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
In my case the problem was rather that other VM's than freenas required a lot more than just 1 out the 2 cores from my CPU. It would've been a very skewed load distribution between the cores if not limiting via CPU Mhz. On the other hand, I don't recall trying without any sort of CPU power locked in for FreeNAS only.
 

sau

Cadet
Joined
Apr 19, 2015
Messages
3
Hopefully no one is upset about reviving an old thread, but I didn't see a clear answer with regards to the OP's question. I believe it is best to match the sockets to cores that are physically present in the system you have to assist with Numa architecture considerations. I'm not sure how far vNuma support has come in VMware but there are performance penalties paid when accessing memory managed by the other processor as well cache adjacency optimizations. I'm not sure what the current state of the nation is as I saw that ESXi 6+ just asks for the number of cores. I also saw a blog post where vNuma is being automatically optimized so perhaps manually specifying things is no longer needed. In my specific case, with a single 4 core processor, I assigned 1 socket and 4 cores, at work, with 2 socket systems, I assigned 2 sockets and 2-20 cores depending on VM needs.

Here's a link that explains things better than I can. https://cto.vmware.com/vnuma-what-it-is-and-why-it-matters/
 
Last edited:
Status
Not open for further replies.
Top