2013-01-31 113 views
1

我租了一臺Joyent SmartOS機器爲我的項目託管Neo4j服務器。Neo4j推薦設置

機器是特小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 
+0

取決於你的數據庫有多大。您在那裏設置的緩存信息是建議您的文件有多大,以幫助您調整緩存的大小,但如果您有更多的信息和內存,則需要緩存緩存較小。 – Nicholas

+0

現在我的數據ammount很小,但讓我們說我有250MB的數據? – webjay

+0

你可以在這裏找到更多關於緩存的信息。 http://docs.neo4j.org/chunked/stable/configuration-caches.html – Nicholas

回答

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(其餘)
+0

我現在有32G,所以它非常快,因爲我仍然只用它來開發[Konfect](http: //www.konfect.com/),但我需要儘快調整。 – webjay