-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Describe the bug
We are currently making a PoC of an App using dGraph as the graphdb. We will have a heavy usage of the k-shortest-path method.
Dataset is ~9000 nodes with 600000 edges, with barely any data in predicates.
While testing it with a sample dataset we found that our k8s nodes went out of memory when using anything, but k=1.
After even more debugging and testing different setups (and increasing resources on the nodes) we found the following:
A) using k=1 and no weights in facets -> dGraph behaves normal (normal = query is very fast ~1sec and memory footprint is low ~512MB)
B) using k=1 and weights in facets -> dGraph behaves same as A
C) using k>1 and no weights on facets -> dGraph gets a bit slower ~2sec for numpath 100 and uses slightly more memory, but very much in acceptable ranges
D) using k>1 and weights in facets -> dGraph eventually crashes with OOM while using >8GB of RAM
To Reproduce
Steps to reproduce the behavior:
- Create a dataset with ~9000 nodes with ~600000 edges in between them with a float facet that will be used for weights
- Create Queries for scenarios A-D
- observe memory footprint
Expected behavior
Looking at the code, the aproximate resource usage between scenario C and D should be somewhat similar, in our case ~1GB of RAM and return the answer in a reasonable time
Environment
- OS: linux docker
- query using ratel
- Version v21.3.2 and v24-latest (had to rollback due to Client is very out of date dgraph.net#56 )