how to warm up page cache in neo4j

ぐ巨炮叔叔 提交于 2019-12-11 13:13:48

问题


I'm executing allShortestPaths query in neo4j.After a lot of tests, I have found that when executing the allShortestPaths query for the first time, it takes about 2~3 seconds, but when executing the same query again, it always takes less than 500ms.

After studying the neo4j documentation, I have known it has the page cache system. In neo4j-operations-manual, it says "When Neo4j starts up, its page cache is empty and needs to warm up",

I am wondering how to warm up the page cache manually,and what's the mechanism of the page cache.

How to guarantee the first query execution cost is less than 500ms?
Total nodes : 0.16 Billion nodes
Total relationships : around 0.16 Million relationships
Index on :E(eid)

A sample of the query is as follow:

"MATCH (node1:E { eid:"a9c2f114-796f-4934-a2d0-04bb3345e1d2" }),(node2:E { eid:"01968dd2-1ed6-472d-82e9-be7701036b3b" }), p = allShortestPaths((node1)-[*]-(node2)) RETURN p LIMIT 25"


回答1:


You may want to install the APOC Procedures library, it has all kinds of great and useful tools, including a warmup procedure.



来源:https://stackoverflow.com/questions/39071324/how-to-warm-up-page-cache-in-neo4j

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!