activegraph
activegraph copied to clipboard
Bolt slower than http
It seems to me that bolt is significantly slower than http. I setup my test app as described in the docs:
rails new myapp -m http://neo4jrb.io/neo4j/neo4j.rb -O
cd myapp
rake neo4j:install[community-latest]
rake neo4j:start
rails generate scaffold User name:string email:string
rails s
open http://localhost:3000/users
Then i create around 10'000 users and record the loading time of the user index page with default http. I then change the protocol to bolt in /config/neo4j.yml:
development:
type: bolt
url: bolt://localhost:7472
Restarting the server and reloading the users/index page yields a much higher rendering time (about twice as long) using bolt.
Is this working as intended? Can you replicate this behavior? Or is my Bolt setup wrong?
Thanks and Greetings
The Bolt
adaptor in neo4j-core
is known to be 2-3 slower than the HTTP
adaptor. It's not something that I've had time to look into, unfortunately (thanks for creating an issue for it, though).
Thank you for your quick reply.
So is there any advantage in using bolt? I was really looking forward to take advantage of the faster protocol with neo4jrb version 8. Are there any plans to fix this?
Unfortunately I don't have the time to investigate, though I'd be willing to look over / release PRs. I think that Neo Technology might be thinking about dedicating some time to Ruby soon, which might help. I'm led to understand, though, that the python implementation of bolt is also slow relative to it's HTTP implementation (whereas other languages' bolt implementations are on-par or somewhat faster than their HTTP implementations).
I also heard that the focus on initial implementations of the bolt protocol wasn't going to be focused on performance but getting things working, but my information might be out of date there.
were there any new discoveries to this matter? I am firing up a bolt query RETURN 123
just to test and I get response times starting with a range of 1 second to 1.5 seconds. Is there any way I can reduce this?
Even with my understanding of the Bolt driver, that still seems particularly slow to me. Do you need to go over the network to access Neo4j?
I'm hoping to get some time to work on the Bolt adaptor in the next couple of weeks, so I'll keep an eye out for performance improvements.
Hi is there any update on this issue? we are about to use neo4j and PSQL in our rails based web service but due to this slowness issue we are in plan to decouple the service and go with java web service for neo4j and rails for PSQL. Fix for this slowness issue will help us lot.
@DheepakD There should not be any slowness issues with https://github.com/neo4jrb/neo4j-ruby-driver.
🎉 Excited to see a Ruby gem based on seabolt! I'll have to try it soon ❤️