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

java-client

(Avinashjain7143) #1

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
https://pastebin.com/XSY5FwkV

Sample JAVA code to reproduce
https://pastebin.com/WBfzkdJ1

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.


Queries are slow using the javaAPI
Function to query a single node by name takes time
#2

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


(Avinash Jain) #3

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


(Avinash Jain) #4

@smantha
@dmai
@shanea

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


#5

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


(Avinash Jain) #6

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.


(Avinash Jain) #7

Any further help can be done?