> Am 25.05.2015 um 03:45 schrieb Xin Su <[email protected]>: > > Thanks for your reply. > I user verson 2.0.1 of Neo4j. Upgrade to 2.2.2
> 1000 nodes in a single transaction. That's fine up, to 50k nodes per tx should work well > I don't hava the size of the heap. Why not? Set it to 4-6G > My system has 12G memory and 300g hard drive SSD or spinning disk? Perhaps you can share your full code? Are you sure you're not having an outer transaction around the one that is committed after 1000 nodes? Michael > > 在 2015年5月21日星期四 UTC+8下午10:08:07,Michael Hunger写道: > Which version of Neo4j are you using? > How many nodes do you insert in a single transaction? > > Please update to 2.2.2 > > How much heap do you use? What disk do you have in your system and how much > memory? > >> Am 21.05.2015 um 11:35 schrieb Xin Su <suxinin...@ <>gmail.com >> <http://gmail.com/>>: >> >> 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 >> >> <http://neo4j.com/docs/stable/linux-performance-guide.html#_setting_the_number_of_open_files>) >> and (http://neo4j.com/docs/stable/configuration-caches.html >> <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 neo4j+un...@ <>googlegroups.com <http://googlegroups.com/>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > -- > 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] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- 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.
