如何预热neo4j中的页面缓存 [英] how to warm up page cache in neo4j

查看:244
本文介绍了如何预热neo4j中的页面缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在neo4j.After的许多测试中执行allShortestPaths查询,我发现第一次执行allShortestPaths查询时,大约需要2〜3秒,但是执行相同的查询时再次,它总是少于500毫秒.

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.

研究了neo4j文档之后,我知道它具有页面缓存系统.在neo4j-operations-manual中,它表示"Neo4j启动时,其页面缓存为空,需要预热",

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",

我想知道如何手动预热页面缓存,以及页面缓存的机制是什么.

如何保证第一个查询的执行成本小于500ms?
总节点数:1.6亿个节点
关系总数:约16万个关系
在:E(eid)上的索引

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)

查询示例如下:

"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"

"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"

推荐答案

您可能要安装

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

这篇关于如何预热neo4j中的页面缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆