Neo4j推荐设置

时间:2013-01-31 22:19:14

标签: optimization neo4j

我租用了Joyent SmartOS机器来为我的项目托管Neo4j服务器。

该机器是 Extra Small 0.5 GB(1 vCPU),这意味着它有512 MB的RAM。

除了以下默认 neostore。设置外,您会推荐什么?

neostore.nodestore.db.mapped_memory=25M
neostore.relationshipstore.db.mapped_memory=50M
neostore.propertystore.db.mapped_memory=90M
neostore.propertystore.db.strings.mapped_memory=130M
neostore.propertystore.db.arrays.mapped_memory=130M

如果需要,可以使用一些CPU信息:

# psrinfo -pv
The physical processor has 6 cores and 12 virtual processors (1 3 5 7 9 11 13 15 17 19 21 23)
  The core has 2 virtual processors (1 13)
  The core has 2 virtual processors (3 15)
  The core has 2 virtual processors (5 17)
  The core has 2 virtual processors (7 19)
  The core has 2 virtual processors (9 21)
  The core has 2 virtual processors (11 23)
    x86 (GenuineIntel 206C2 family 6 model 44 step 2 clock 2400 MHz)
      Intel(r) Xeon(r) CPU           E5645  @ 2.40GHz
The physical processor has 6 cores and 12 virtual processors (0 2 4 6 8 10 12 14 16 18 20 22)
  The core has 2 virtual processors (0 12)
  The core has 2 virtual processors (2 14)
  The core has 2 virtual processors (4 16)
  The core has 2 virtual processors (6 18)
  The core has 2 virtual processors (8 20)
  The core has 2 virtual processors (10 22)
    x86 (GenuineIntel 206C2 family 6 model 44 step 2 clock 2400 MHz)
      Intel(r) Xeon(r) CPU           E5645  @ 2.40GHz

1 个答案:

答案 0 :(得分:2)

配置中的neostore.xxxx.mapped_memory设置应理想地与graph.db目录中相应文件的大小相匹配。

鉴于你有512 MB的RAM可用而且你的图形大约是250 MB,为你提供大约250MB的操作系统 JVM堆,我觉得它太小了。

如果你的盒子有2G,我会计算:

  • 250 MB映射内存
  • 1 GB Java堆(又名-Xmx1g -Xms1g)
  • 750 MB OS(其余)