Your trace looks ok, it is just a few threads busy reading things.
It could be garbage collection induced CPU spikes or something else that's not visible in the stacks.
Can you share the (type of) statements you run?
For your queries:
- only merge on one label
- make sure to have an index / constraint for each :Label(property) that you merge or match on
- if you match on a property always have a :Label and an index for it:
you might also want to add a generic :Node label if you are working with generic guids all the time
create index on :Node(guid);
create index on :Book(id);
'MERGE (u:Node{guid:{guid}})',
'SET u.name={name}, u:Book'
'MERGE (u:Node {guid:{guid}})',
'SET u.name={name}, u.sub_type={sub_type}, u:Home:Area'
// are you sure you mean :Book(id) not :Book(guid) ?
'MATCH ( e:Node {guid:{guid}} ), (m:Book{id:{id}})',
'MERGE (e)<-[r:MEMBER]-(m)',
'return r'