CPU Problem Executing SPARQL #3908
-
I am adding models to a repository. to check the versions of the models to be added, I need to query the maximum version for an identifier for each insert.
At the beginning, determining the versions (via HTTP SPARQL!) takes ~200ms. When I get closer to 2000 models, the duration for the query increases significantly. I was expecting more of a memory problem, but from ~ 2000 objects onwards you can clearly see that the cpu is close to 100%. Network load drops, memory remains fairly constant. From this I deduce that my server, which executes the query, is overloading the cpu. (Of course, a lot is running in parallel there) But I have only inserted a fraction of the models. So my import will never be finished. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Can you tell us a bit more about your setup?
Are you able use the explanation feature for SPARQL queries so we can see what's going on?
|
Beta Was this translation helpful? Give feedback.
-
Shame on me. I found the problem. I was looking in completely the wrong place all along. The error was creating the SPARQLRepository on the client side. I created a new SPARQLRepository for each request. And i marked this code with a todo and a warning. But all this is of no use if you miss your hints. Last test with running the client on my local machine:
DURATION: 559 seconds for 5000 kvmEntries. |
Beta Was this translation helpful? Give feedback.
Shame on me. I found the problem. I was looking in completely the wrong place all along. The error was creating the SPARQLRepository on the client side. I created a new SPARQLRepository for each request. And i marked this code with a todo and a warning. But all this is of no use if you miss your hints.
Thanks again for your support!
I'll now cleanup and move the whole stuff to the servers.
Last test with running the client on my local machine: