Neo4j社区版可以开始预热吗? [英] Can Neo4j community edition start in warm up?

查看:566
本文介绍了Neo4j社区版可以开始预热吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在ubuntu上的rest服务器中使用neo4j 2.0社区版.
每次启动neo4j后,第一个查询的响应速度都很慢. 并保持与第一个相同的查询是快速响应.我猜这是相对于缓存的行为.
我试图通过以下查询来缓存所有原语(node,rel,props).在启动neo4j服务器后,我使用webadmin执行了查询,但是第一次查询的性能并没有提高.

I'm using neo4j 2.0 community edition in rest server on ubuntu.
Every time a first query is slow response after startup the neo4j. And remain queries which is same the first one are fast response. I guess this behavior is relative to cache.
I tried to cache all primitives(node, rel, props) by following query. I executed the query using webadmin after stareted up neo4j server, but the first query performance didn't improve.

start n=node(*) match n--m return count(n)

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

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

All primitives size about 1.5GB, and my computer resource is enough. my neo4j.properties is here:

# 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 communith版启动起来?

Is there a way that neo4j communith edition startup with cache in worm up?

谢谢

推荐答案

您使用哪个版本?

它们唯一可以预热缓存的方法是运行典型查询.

They only way you can warm up your cache is to run your typical queries.

3倍

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

此查询应有助于预热:

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

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

If you also want to load properties too you can add:

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

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

What do your typical queries that are slow look like?

这篇关于Neo4j社区版可以开始预热吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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