Our setup:
- Dgraph setup with about 111000 graph-nodes with various edges
- The Alpha container uses 3.8GB RAM (using
docker stats
)
Scenario:
- sending 1 mutation(s) per second to Dgraph
- each mutation writes the same structure/type of 36 edges with primitive values plus two dgraph.type entries
- none of the 36 edges has an index
Observation (using docker stats
):
- after 88000 write (about 1 day later) the Alpha container uses 21GB RAM
- after stopping and restarting all containers the Alpha container RAM usage shows 10GB
- the RAM usage is growing about 6.2GB/88000 - 70KB per mutation
- the RAM increase in one month is projected to be 186GB
Expected behavior:
- The Alpha container’s RAM usage should not increase that drastic, we are planning running this for many month.
Questions:
- Is this the expected behavior?
- If those mutation data are written to the harddrive why is the RAM usage increasing?
- If the Alpha node starts with option ‘–lru_mb=4096’, why does the RAM usage get so far over 4096MB?
- What is the recommendation to keep this running for a year on a 32GB RAM system without running out of memory?
docker-compose.yaml
version: '3.5'
services:
zero:
image: dgraph/dgraph:v20.03.3
volumes:
- dgraph-volume:/dgraph
restart: always
command: dgraph zero --my=zero:5080
alpha:
image: dgraph/dgraph:v20.03.3
volumes:
- dgraph-volume:/dgraph
ports:
- 8080:8080 # http for ratel
- 9080:9080 # gRPC
restart: always
command: dgraph alpha --my=alpha:7080 --lru_mb=4096 --zero=zero:5080
ratel:
image: dgraph/dgraph:v20.03.3
ports:
- 8000:8000
restart: always
command: dgraph-ratel
Example mutation data:
{
"AreaName": "OTS",
"Category": "PROCESS",
"AlarmSet": "Standard",
"ModuleDescription": "E-103",
"Nalm": 0,
"OperatorSuppressed": false,
"RecordType": 2,
"SequenceNumber": 85,
"SuppressionReason": 255,
"UnitName": "HEAT_EXCHANGERS",
"Laalm": 0,
"ZoneId": 0,
"CualmWord": "",
"FunctionalClassificationWord": "Not classified",
"LaalmWord": ":HEAT",
"Priority": 24,
"ZoneName": "",
"AlarmMessage": "Inputs Transfer Failure",
"AlarmStateWord": "NotValid",
"Attribute": "",
"EventClass": 1,
"ModuleName": "E-103",
"NodeName": "USAUST-DEV797",
"OutOfService": false,
"AlarmId": ":HEAT_EXCHANGERS:E-103",
"Importance": "1729431211091013888",
"EventType": 73,
"EORType": 1,
"FunctionalClassification": 0,
"PriorityWord": "",
"AlarmState": "Unknown",
"AreaNumber": 16,
"Cualm": 0,
"Message": "E-103/HX_E-103/XFR2/SELECTOR",
"OwnedBy": "?",
"SuppressionReasonWord": "",
"dgraph.type": [
"Core/Obj",
"Types/Event"
]
}