-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Explore memory pressure on etcd. #3853
Comments
There is a couple ways to do this:
With 2), we could benefit from Kubelet's RestartPolicy feature besides resource monitoring and logging, thus #3852 is not needed. |
cc/ @ArtfulCoder |
Yeah, I think that we should do #2, and then we can use cAdvisor/grafana, --brendan On Wed, Jan 28, 2015 at 12:59 PM, Dawn Chen notifications@github.com
|
Interested. I think one of the reasons I can't get a functional 500-node cluster is due to etcd so any help with debugging would be great. |
Just had offline discussion with @ArtfulCoder. He will work on this as a starter project. |
@brendandburns @dchen1107 |
I don't see how running etcd in a pod helps in the near term without knowing why it was actually crashing for us. I would be curious if you guys reproduce how big a etcd snapshot size was getting for you when it crashed to know if it was data size that was causing the issue, or just traffic. @xiang90 - moving to a disk backed system +1000 |
@xiang90 +1 on moving etcd to a disk backed system. @derekwaynecarr We saw a couple incidents reported lately about the cluster is down, the pod stays pending, kubectl gets errors, etc. After some investigation, all of them are due etc etcd is crashed. Investigating future, there is a OOM event recorded in kernel log. Since etcd running on master node as "free" process today, we have no idea how much memory it used when kernel OOM kills it. On GCE, every master node has kubelet and cadvisor running already. Running etcd in a pod, cadvisor will reports its resource usage. When etcd docker container is oom-killed, Kubelet will auto-restart it based on the policy, and log an OOM events (#2853, cadvisor just added feature to detect such events). I agree this is just the first step on exploring and solving memory pressure. Also we already know we send too much duplicate events to etcd. But that is a different topic and will be addressed separately. |
I debugged the memory problem when I had some free time, because it was annoying to have my cluster going down every few days. Debug notes:
|
cc @hchoudh |
/quinton |
We have done some investigation around this. Typically etcd will use upto 10-20x memory for small key value. The OOM @dchen1107 observed was caused by memory usage increment during recovery. We have some fixes included in the next etcd release. However, you still need to prepare for upto 40x memory usage while snapshotting/recovering. My question is what is the hard requirement from k8s v1? Do you have a data size estimation? (We are also planing on new backend to completely some the data scalability issue) /cc @philips |
also see etcd-io/etcd#2657 etcd-io/etcd#2658 |
also see etcd-io/etcd#2662 |
Moving this out of 1.0, as I believe any related issues are covered by performance metrics elsewhere. |
Besides performance metrics, a little bit more status updated on this:
Here are what we haven't done yet:
|
All the things dawn listed are done so closing. Feel free to reopen. cc @wojtek-t since perf related |
It appears that our event stream is putting pressure on etcd and leading to crashes. Investigate event + etcd memory performance
The text was updated successfully, but these errors were encountered: