首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Neo4j社区版能从热身开始吗?

Neo4j社区版能从热身开始吗?
EN

Stack Overflow用户
提问于 2013-12-17 11:03:19
回答 1查看 1K关注 0票数 1

我在ubuntu上的rest服务器上使用neo4j 2.0社区版本。

每次启动neo4j后,第一个查询的响应都很慢。并保留相同的查询,第一个是快速响应。我猜这种行为与缓存有关。

我试图通过以下查询来缓存所有原语(节点、rel、props)。在安装了neo4j服务器之后,我使用webadmin执行了查询,但是第一个查询性能没有提高。

代码语言:javascript
复制
start n=node(*) match n--m return count(n)

代码语言:javascript
复制
match (n)-[r]-() return count(n)

所有原语的大小约为1.5GB,我的计算机资源就足够了。我的neo4j.properties在这里:

代码语言:javascript
复制
# Default values for the low-level graph engine
all_stores_total_mapped_memory_size=1500M
eostore.nodestore.db.mapped_memory=150M
neostore.relationshipstore.db.mapped_memory=200M
neostore.propertystore.db.mapped_memory=600M
neostore.propertystore.db.strings.mapped_memory=500M
neostore.propertystore.db.arrays.mapped_memory=10M

# Enable this to be able to upgrade a store from an older version
#allow_store_upgrade=true

# Enable this to specify a parser other than the default one.
cypher_parser_version=2.0

# Keep logical logs, helps debugging but uses more disk space, enabled for
# legacy reasons To limit space needed to store historical logs use values such
# as: "7 days" or "100M size" instead of "true"
keep_logical_logs=true

# Autoindexing

# Enable auto-indexing for nodes, default is false
#node_auto_indexing=true

# The node property keys to be auto-indexed, if enabled
#node_keys_indexable=name,age

# Enable auto-indexing for relationships, default is false
#relationship_auto_indexing=true

# The relationship property keys to be auto-indexed, if enabled
#relationship_keys_indexable=name,age

dump_configuration=true

是否有一种方式,neo4j社区版启动与缓存在蠕虫上?

谢谢

EN

回答 1

Stack Overflow用户

发布于 2013-12-18 11:41:34

你用的是哪个版本?

它们只有运行典型的查询才能使缓存热身。

它是三倍

  1. 预热文件系统缓存(mmio)
  2. 预热高级缓存(对象缓存)
  3. 预编译你将要使用的密码查询,所以密码不必为第一个用户构建它们。

这个查询应该有助于热身:

match (n)-[r]-() return count(n)

如果您也希望加载属性,则可以添加:

match (n)-[r]-() where not has(n.foo) and not has(r.foo) return count(n)

您典型的缓慢查询是什么样子的?

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20632421

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档