Unable to run dgraph in a multi-node kubernetes cluster

Depends on the query yes. More cores would usually lead to better performance because Dgraph tries to make heavy use of concurrency to optimize performance for reads/writes.

Thank you for the clarification. Would that be OK if I set an upper limit on each pod? Will a dgraph pod crashes if it’s CPU or memory demand is not satisfied? ie it uses up the resources in the VM instances.
In gcloud documentation, If your Pods have requested too few resources (or haven't changed the defaults, which might be insufficient) and your nodes are experiencing shortages, cluster autoscaler does not correct the situation. You can help ensure cluster autoscaler works as accurately as possible by making explicit resource requests for all of your workloads.

Yeah, I think it would crash if the memory demand is not satisfied. Less CPU would just make it slower. I’d suggest setting memory_mb to half of your memory constraint.

OK I set the memory limit of the container to 6GB and --memory_mb 3000 when I run some ingestion the dgraph server will try to use more than 6 GB and get OOMKILLED (the memory demand exceeded the limit) by kubernetes. Is there a proper way to avoid this other than increase the memory limit? ie if I set the memory limit to 9GB will it exceed the limit again with the same option --memory_mb 3000.

--memory_mb is an approximate amount. If you limit container to 6GB, then try memory_mb as 2000 maybe. There isn’t a hard limit to the memory taken by the process and it might exceed for a bit till GC runs and frees up memory.

Pod is still crashing occasionally due to out of memory after setting the limit the 6GB with memory_mb as 2000. I have to use unlimited Memory as I see it can go up to 12GB and more. It would be nice if there is a resource limit configuration, just a nice to have.

Do you know how often GC runs? or what triggers it? Also, a silly question, what does GC stand for?

GC is garbage collection. It runs periodically in Go. It shouldn’t go upto 12GB with memory_mb set as 2000. Can you file a Github issue mentioning this? We will get it checked and come up with a better memory management solution.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.