When writing data, dgraph takes up too much memory

hey @zzl221000, can you show us your java program? There is a known issue with doing too many txn.mutate calls. If you have the following pattern

txn = newTxn()
for .... {
    ...
    txn.mutate(...)
}
txn.commit

Then the time taken to complete the operation is the order of N^2.

If you can show us your java program, we can verify if you’re seeing the same issue.