Poor performance of Dgraph for Sample case ? Check if implementation is wrong?

Looks Like getting and creating 50k nodes, not achievable in 1 sec with latest dgraph java.

Windows 16 GB RAM and Dgraph version v1.0.8

Server config

Sample JAVA code to reproduce

Results
Writes :- 50k nodes in batch Took 15.16 mins
50k nodes one by one Took 72sec
Reads :- Getting 1 lac nodes one by one Took 2.17 mins

Help me with JAVA implementation to crack this in mili seconds, i may be implementing in wrong way.

Hey,
Hey try doing your commits in batches of around 100 in each transaction instead of 3000.

Itā€™s faster with smaller sets of json.

S

1 Like

Ok, That way i will achieve only creating nodes. But what about getting?

@smantha
@dmai
@shanea

This is very fundamental problem for me, if anyone can help please.

Avinash,
Not sure what use case you are looking to solve by using graph database. You are querying 1 lakh nodes one at a timeā€¦ When would you practically require to get these many nodes? Further, you execute term search but are not measuring exact dgraph responses (line 114 is only dgraph call for retreival)

So your timings include non dgraph processing.

What is your actual graph schema? What is your use case for graph processing? Itā€™s not clear from the exampleā€¦

It maybe you are applying relational thinkingā€¦

Hope that helps.

Sheshadri

As we are revaluating dgraph, so we have just created test data to check performance. than we will plan the real case.

I have tried running 1lac query at once with single transaction that time was with in 1 min. while it was taking more time if try to do the same with dgraphClient.newTransaction() for each query. Just trying to know that why we need to create transaction for select queries.

I am just creating 1 lac nodes no relations. that create is taking around 15 mins.

1 Like

Any further help can be done?