我在ubuntu上的rest服务器上使用neo4j 2.0社区版本。
每次启动neo4j后,第一个查询的响应都很慢。并保留相同的查询,第一个是快速响应。我猜这种行为与缓存有关。
我试图通过以下查询来缓存所有原语(节点、rel、props)。在安装了neo4j服务器之后,我使用webadmin执行了查询,但是第一个查询性能没有提高。
start n=node(*) match n--m return count(n)或
match (n)-[r]-() return count(n)所有原语的大小约为1.5GB,我的计算机资源就足够了。我的neo4j.properties在这里:
# 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社区版启动与缓存在蠕虫上?
谢谢
发布于 2013-12-18 11:41:34
你用的是哪个版本?
它们只有运行典型的查询才能使缓存热身。
它是三倍
这个查询应该有助于热身:
match (n)-[r]-() return count(n)
如果您也希望加载属性,则可以添加:
match (n)-[r]-() where not has(n.foo) and not has(r.foo) return count(n)
您典型的缓慢查询是什么样子的?
https://stackoverflow.com/questions/20632421
复制相似问题