Hellow everyone : 
         It takes too much of virtual memory when I insert data.I have 
already referred(
http://neo4j.com/docs/stable/linux-performance-guide.html#_setting_the_number_of_open_files
)  and (http://neo4j.com/docs/stable/configuration-caches.html).
 public  Node getOrCreateNode(GraphDatabaseService _graphDb,Object _obj,Map<
String, Object> _propsMap) {
   long start=System.currentTimeMillis();
 
   Validate.notNull(_obj);
   Validate.notNull(_graphDb);
 
   UniqueNodeFactory uniqueNodeFactory=new UniqueNodeFactory(_graphDb, 
CUSTOM_KEY_INDEX) {
     @Override
     protected void initialize(Node created, Map<String, Object> properties) 
{
       created.setProperty(CUSTOM_KEY, properties.get(CUSTOM_KEY));
     }
   };

   Node node= uniqueNodeFactory.getOrCreate(CUSTOM_KEY,_obj);
 

   if (MapUtils.isNotEmpty(_propsMap)) {
     for (String p : _propsMap.keySet()) {
       if (!p.equals(CUSTOM_KEY)) {
         Object objValue=_propsMap.get(p);
         if (objValue instanceof List) {
           Object objs=Neo4jTypeConverter.convertToNeo4jPropArray((List)
objValue);
           node.setProperty(p, objs);
         }else {
           node.setProperty(p, objValue);
         }
       }
     }
   }
    
   if (LOG.isDebugEnabled()) {

     long end=System.currentTimeMillis();
     LOG.debug(GDBConstant.PROJECT+" "+node.getId()+",耗时:"+(end-start)+"ms"
);
   }
 return node;
}

neostore.nodestore.db.mapped_memory=250M
neostore.relationshipstore.db.mapped_memory=100M
neostore.propertystore.db.mapped_memory=100M
neostore.propertystore.db.strings.mapped_memory=100M
neostore.propertystore.db.arrays.mapped_memory=100M

vm.dirty_background_ratio = 50
vm.dirty_ratio = 80


-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to