-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using multiple CPUs with VirtualBox causes etcd thrashing #1997
Comments
@josh-padnick How many CPUs does your physical machine have? If I'm reading this right, you're attempting to use a total of 12 CPUs, which each machine having 4 CPUs. A quick google search leads me to believe this maybe a virtual box bug: |
@kelseyhightower Thx for looking into this. I'm on a Macbook Retina Pro 15-inch, which has a quad-core Intel Core i7. Since the i7 has hyper-threading, my understanding is this appears as 8 logical CPUs to the OS and indeed, VirtualBox allows me to select up to 8 CPUs (Screenshot, Multi-Core + Hyper-Threading). The line This has the effect of setting each of the VMs to 4 CPUs (as you wrote), but VirtualBox manages the parallel processing, so I don't think it would be correct to think of this as a "total" of 12 CPUs. Inspired by your link, I found a Reddit thread that suggests that VirtualBox has to wait until all requested CPUs (e.g. all 4 CPUs) are available before it will run a process. I haven't officially verified this, but there does seem to be some slowness and overhead associated with using multiple CPUs in VirtualBox. Based on what I've read, my recommendations are to:
Note that I have not researched the "multiple CPUs on Virtualbox" in depth. |
@josh-padnick Thanks for the response. I like your suggestion for the doc improvements and I'll start working on those today. |
This is not etcd related, so i don't think we need to document it.
You can configure etcd timeout through '--heartbeat-interval' and '--election-timeout'. |
Close this due to low activity. Feel free to reopen it if you have more thoughts. |
I've been following the official documentation on running a CoreOS Cluster with Vagrant and Virtualbox. If I use the default settings, things work fine, but I've discovered that when I make the following change:
I start to see the same etcd thrashing previously reported (e.g. #868). Interestingly, the pace of leader changes seems to approximately double as I double the value of
$vb_cpus
. So, I get no thrashing at all with$vb_cpus=1
, some with$vb_cpus=2
, twice as much with$vb_cpus=4
and four times as much with$vb_cpus=8
.I want to use multiple CPUs because I was thinking about compiling my code within a container, but now I'm thinking I'm better off just sharing a volume with my VM and container and compiling on my host machine.
Is this a bug, or am I missing something? Here are some other stats on my environment:
Running VirtualBox 4.3.20 r96996
The text was updated successfully, but these errors were encountered: