Single thread

I mapped out the domain name through nginx. Now I have accessed it through the domain name and set up load balancing. Through nearly an hour’s observation, there are some effects. However, if the parallelism is increased, it will increase from 20 to 80, the latency will increase from 60ms to 180ms, and the CPU utilization rate of the server will also reach 50%. QPS slightly increased, from 180 to 250.

“In which node the predicate is distributed”,“predicate“ refers to “name, alias” and so on in a query statement。The node where the predicate is located has high CPU utilization。

Yes, all the query statements are so complex。

I think we have some communication issues here. I asked to reformulate the question, cuz I wasn’t sure what you meant. I know what is a predicate. What I don’t understand is what you wish me to answer. Like “In which node the predicate is distributed,” - What node? what do you wanna know exactly? The predicates are distributed. If you wanna go deeper into how it works you can read this paper Dgraph Whitepapers: In-Depth Insights and Analysis

By the node you mean the Dgraph instance, right? Well, when you do a request several Alphas are triggered. If all needed predicates are located in a single Alpha, only that Alpha will work. If your predicates are balanced between the Alphas, Dgraph will reach them in a distributed manner. And the Alpha that you started the request will do the rest of the job.

Cool, you should have an improvement by now.

Double the number of Alphas. 2 per machine. Are you following the CPU, RAM, and other resources during the usage? can you share?

You should simplify this.

dgraph貌似只适合做简单查询,当有复杂的filter操作时效率会大幅降低,而且怎么测都感觉它是单线程的,加机器都不好使。。。