Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-16-2023 12:25 AM - edited 01-16-2023 12:29 AM
There're two socket of cpu with each 8 core & 16 thread in my computer (i.e., total 2*8 core and 16*2 thread).
When I was running apoc.periodic.iterate with parallel = TRUE, for example,
CALL apoc.periodic.iterate(
'MATCH (n) RETURN id(n) AS id',
'MATCH (n) WHERE id(n)=id DELETE n',
{batchSize: 5000, parallel :true});
I find (using HWiNFO64 and task manager) that It did parallel but only in one of socket's cpu, i.e, only 8 core were parallel, others (16-8=8) were not running.
Question : Is this the limitation of neo4j that it can only parallel in one socket's cpu, or is there any method to solve this problem (that I want to parallel in all socket, i.e., all CPU but not just one of socket)
By the way, I notice that the parallel method in Neo4j is "multi-process". Can neo4j parallel in multi-thread?
Thanks.
01-16-2023 01:56 AM
Hello @Peter_Lian 😊
Did try to play with the concurrency parameter?
Moreover, if you want to erase the whole database, you should use CREATE OR REPLACE DATABASE name_of_your_database
Regards,
Cobra
01-16-2023 06:08 AM
No, how to set concurrency parameter?
The example of apoc.periodic.iterate just an example, but thanks for your suggestion !
01-17-2023 05:27 AM
For example:
CALL apoc.periodic.iterate(
"MATCH (n) RETURN n",
"SET n.value = true",
{batchSize:100, parallel:true, concurrency:4}
)
Regards,
Cobra
All the sessions of the conference are now available online