跨数据库重启保留 Neo4j 页面缓存
从 Neo4j 3.4 开始,并且由于 PR 10957,以及在使用 Neo4j 企业版时,Neo4j 页面缓存将在数据库重启后保留,因此可能不再需要预热页面缓存。
由于 PR 的结果,每隔 60 秒,我们将记录 Neo4j 页面缓存的页面并将此数据存储在 graph.db/profile
中。此目录的内容类似于
$ ls -al
total 80
drwxrwxr-x 2 neo4j neo4j 4096 Apr 18 12:12 .
drwxrwxr-x 6 neo4j neo4j 4096 Apr 18 12:06 ..
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.counts.db.a.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 18 12:11 neostore.counts.db.b.cacheprof
-rw-rw-r-- 1 neo4j neo4j 24 Apr 19 08:31 neostore.labelscanstore.db.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.labeltokenstore.db.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.labeltokenstore.db.names.cacheprof
-rw-rw-r-- 1 neo4j neo4j 28 Apr 19 08:31 neostore.nodestore.db.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.nodestore.db.labels.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.propertystore.db.arrays.cacheprof
-rw-rw-r-- 1 neo4j neo4j 29 Apr 19 08:31 neostore.propertystore.db.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.propertystore.db.index.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.propertystore.db.index.keys.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.propertystore.db.strings.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.relationshipgroupstore.db.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.relationshipstore.db.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.relationshiptypestore.db.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.relationshiptypestore.db.names.cacheprof
-rw-rw-r-- 1 neo4j neo4j 21 Apr 19 08:31 neostore.schemastore.db.cacheprof
由于每个文件都表示给定文件的内存中页面的 gzip 压缩位图(即每个 8 KiB 页面由一个位表示),因此我们预计上述文件的大小将保持相对较小。
此外,graph.db/profiles
将包含在备份中,因此在还原和 Neo4j 启动时,将根据备份时页面缓存的状态重新加载页面缓存。
此页面是否有帮助?