New on Neo4j: The Neo4j 2.3.0 Milestone 2 Release is Here
The Neo4j 2.3 Milestone 2 release is now available. The Neo4j engineering team put a lot of effort into several areas to improve it from the last release.
Join the DZone community and get the full member experience.Join For Free
if you haven’t heard already, the neo4j 2.3 milestone 2 release is now available .
(full disclosure: this milestone release is for development and experimentation only since not all features are in their finalized form. click here to download the fully stable version of neo4j 2.2.2 .)
as we continue to develop neo4j 2.3, we want to make neo4j more scalable and efficient in handling your graph data. that’s why the neo4j engineering team put a lot of effort into several areas that more efficiently use existing resources.
not all of these features detailed below are fully operational in the milestone 2 release, but here’s your first glance at what’s to come.
highly scalable off-heap graph cache
neo4j 2.3 concludes a 2-year journey that started with neo4j 2.1, to move the graph cache fully off of the jvm heap. one major facet of the 2.3 release is the replacement of the now unnecessary second-level object cache.
as neo4j’s implementation (especially cypher) moves closer to the metal, it creates fewer and fewer objects, putting less strain on the garbage collector. the new page cache introduced in neo4j 2.2 made it possible to more efficiently map small fragments of store-files into memory and lessened the need for a higher level cache.
with this change, there is much more memory available to map your store files into memory. also, with the lower strain on the garbage collector, neo4j and clusters of neo4j machines run more stable and with fewer long pause times.
the new page cache also provides significant (up to 2-3x) improvements in concurrent read scaling. you should be able to reduce your heap settings and increase the page-cache settings by the same amount.
please help us test this big change (which allowed us to delete 13,000 lines of code) by running more intensive test-workloads on neo4j 2.3.m02 and report back how neo4j behaves for you in terms of gc-pauses, performance and cluster stability.
cypher cost-based optimizer improvements
the optimizer is now better at choosing the most efficient query plan. this primarily impacts large or complex read queries, improving performance.
please note, that you can always force the planner to revert to the previous rule-based planner with the hint:
and remember to check your query plans visually by prefixing slow queries with
as part of the memory and runtime efficiency improvements, we are moving the cypher runtime engine from its current form, which uses scala and interpreted execution plans, to a new and much more efficient engine that compiles queries down to bytecode. this bytecode is then executed and optimized by the hotspot jvm.
currently the compilation phase only works with very simple queries but over time, it will cover a larger scope with further milestone releases. if the bytecode compiler is unable to compile the query, it simply falls back to the existing interpreted runtime.
you’ll notice some new cypher hints to select the runtime, alongside the existing hints that can be used to specify the planner:
cypher planner=cost|rule runtime=compiled|interpreted match (n) return n
the profile does not yet show what runtime is used, but you can see what runtime it uses by inspecting the code-view (more below) of a profile execution and examining the http-response.
we also have a number of user experience improvements in this milestone release. one example is that now you can pin guides, especially ones that continuously execute cypher queries as part of the guide. these include examples like the movie graph (:play movie graph), northwind database import (:play northwind graph), query templates (:play query template) and history (:history).
another key ux improvement is code-view . if you ever wondered what the browser executes under the hood, when you execute a query, code-view is for you. it is a new view in the result pane of your actions, indicated by a </> icon.
the code-view shows the http request(s) sent to the server including headers and the responses, including response-headers, so you can reproduce the same with a http command line tool like curl or a browser plugin like postman . code-view also helps you examine any issues you might encounter while the neo4j browser communicates with the server backend.
going forward we also want the code-view feature to show what you would have to write with our most widely used drivers and languages .
we hope you enjoy taking the neo4j 2.3.0-m02 release for a spin. please send us your feedback , especially when it comes to performance and stability with the removed object cache. we’re looking forward to the next stable release of neo4j 2.3 once it’s released.
have fun testing this milestone,
cypher reference card: http://neo4j.com/docs/milestone/cypher-refcard
feedback please to: firstname.lastname@example.org
Published at DZone with permission of , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.