In my scenario, many nodes should link to one, but mutation speed drops very sharp, how can I acclerate mutation speed in this situation?
Here is my experiment:
First I generate 10,000,000 nodes and they all link to node 1.
with open(“a.rdf”,“w”) as f:
for i in range(2,10000000):
a = f"_:{i} _:1 . \n"
f.write(a)
I use dgraph live and the mutation time is 1m37.731695169s
when few nodes link to one node, the mutation speed is sharply faster.
with open(“b.rdf”,“w”) as f:
for i in range(1,5000):
for j in range(60000,62000):
a = f"_:{i} _:{j} . \n"
f.write(a)
I use dgraph live and the mutation time is 54.934653541s
In my scenario I should make many nodes link to one , how can I accelareate mutation speed?
This is the simple experiment to show the situation. In our project, if more than one million nodes links to one node , the mutation time sharply increase. In our project we send almost 10000 rdfs in a single transaction. In upper experment we use dgraph live.
dgraph live -r a.rdf dgraph live -r b.rdf
but the result that the speed is slow is not changed. How can I accelerate the mutation speed in this situation? In our deployment environment we only have HDD.
In a.rdf there is 10,000,000 nodes and they all link to node 1
The time consumed to write these two files is several times different.
I think the question is If a node has a large number of edges (like 10,000,000), will it slow down the writing speed? ?
Assuming that the speed of B is normal, why is the speed of A much slower than that of B? Is it caused by a large number of edges connected to a node in A?