Neo4j:有关硬件大小调整和配置的建议 [英] Neo4j : Advices for hardware sizing and config

查看:828
本文介绍了Neo4j:有关硬件大小调整和配置的建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用neo4j 2.0 db玩几个月,我打算将db安装在专用服务器上.我已经尝试过neo4j的几个配置(jvm,缓存等),但是我仍然不确定是否找到了最好的配置. 因此,最好向专家询问:)

I've been playing with a neo4j 2.0 db for a few months and I plan to install the db on a dedicated server. I've already tried several configs of neo4j (jvm, caches, ...) but I'm still not sure to have found the best one. Therefore, it seems better to ask to the experts :)

Db基元:

节点= 224,114,478

Nodes = 224,114,478

关系= 417,681,104

Relationships = 417,681,104

属性= 224,342,951

Properties = 224,342,951

Db文件:

  • nodestore.db = 3.064Gb

  • nodestore.db = 3.064Gb

relationshipstore.db = 13.460Gb

relationshipstore.db = 13.460Gb

propertystore.db = 8.982 Gb

propertystore.db = 8.982 Gb

propertystore.db.string = 5.998 Gb

propertystore.db.string = 5.998 Gb

propertystore.db.arrays = 1kb

propertystore.db.arrays = 1kb

操作系统服务器:

Windows Server 2012(64b)

Windows server 2012 (64b)

Db使用情况:

大多数使用密码查询进行图遍历.

Mostly graph traversals using cypher queries.

即使某些查询有很大的滞后,我的开发型笔记本电脑上的性能也不算太差(我怀疑主要原因是由于内存不足导致的交换)

Perfs are not too bad on my dev laptop even if some queries have huge lags (I suspect that the main reason is swap caused by lack of RAM)

图形特性:

我怀疑某些节点可能是巨大的集线器(直到1M关系),但它应该仍然是例外.

I suspect that some nodes may be huge hubs (till 1M relationships) but it should remain exceptional.

您对以下方面有何建议?

What would be your advices regarding:

  • 硬件大小调整

  • hardware sizing,

neo4j配置:

  • 堆大小

  • heap size,

使用内存映射缓冲区(是否有任何理由在Windows中将该值保留为false?)

use memory map buffer (is there any reason to keep the value to false with windows ?)

缓存类型

推荐用于Windows的jvm设置

recommended jvm settings for windows,

...

提前谢谢!

劳伦特

推荐答案

图形的磁盘大小总计约为32 GB. Neo4j具有两层缓存体系结构.第一层是文件缓冲区高速缓存.理想情况下,它的大小应与磁盘上的图表大小相同,因此,根据您的情况,大约为32GB.

The on-disk size of your graph is in total ~32 GB. Neo4j has a two layered cache architecture. The first layer is the file buffer cache. Ideally it should have the same size as the on disk graph, so ~32GB in your case.

重要在Windows上运行Neo4j时,文件缓冲区高速缓存是Java堆的一部分(由于Windows本身很笨拙).在Linux/Mac上,这是没有堆的.这就是为什么我通常不建议在Windows上使用Neo4j的生产环境的原因.

IMPORTANT When running Neo4j on Windows, the file buffer cache is part of Java heap (due to the suckiness of Windows by itself). On Linux/Mac it's off heap. That is reason why I generally do not recommend production environments for Neo4j on Windows.

cache_type应该为hpc,对于社区来说,应为soft.

cache_type should be hpc when using enterprise edition and soft for community.

要在第二个缓存层(对象缓存)中有一些合理的数量,我建议使用一台至少具有64GB RAM的计算机.由于文件缓冲区和对象高速缓存都在堆上,因此使堆变大并考虑使用G1:-Xmx60G -XX:+UseG1GC.通过取消注释neo4j-wrapper.conf中的gc日志来观察GC行为,并逐步调整设置.

To have some reasonable amount for the second cache layer (object cache) I'd suggest to have a machine with at least 64GB RAM. Since file buffer and object cache are both on heap, make heap large and consider using G1: -Xmx60G -XX:+UseG1GC. Observe GC behaviour by uncommenting gc logging in neo4j-wrapper.conf and tweak the settings step by step.

请注意,Neo4j 2.2可能带有不同的文件缓冲区高速缓存实现,该实现在Windows上也可以在堆外工作.

Please note that Neo4j 2.2 might come with a different file buffer cache implementation that works off heap on Windows as well.

这篇关于Neo4j:有关硬件大小调整和配置的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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