That is more than enough.

Try to batch the transactions then.

> Am 13.02.2015 um 21:29 schrieb Daniele El-Jaick <[email protected]>:
> 
> Ok.
> I will try.
> I am using 5gb for heap.
> Thanks
> Daniele
> 
> Em sexta-feira, 13 de fevereiro de 2015 18:17:57 UTC-2, Michael Hunger 
> escreveu:
> for your create node-space ops, you have to batch the transactions,
> 
> i.e. call success() and close() every 20000 operations and create a new tx
> 
> Also as you are using two databases in the same VM they also use double the 
> memory
> 
> How much heap did you provide to your program?
> 
> You code looks like generated, perhaps instead of generating the code it's 
> better to actually generate the graph?
> 
> Michael
> 
> Am 13.02.2015 um 20:09 schrieb Daniele El-Jaick <[email protected] 
> <javascript:>>:
> 
> Sorry about it.
> I had sucess creating 50.000 graphs but nothing else.
> Also http://localhost:7474/browser/ <http://localhost:7474/browser/> do not 
> open 50.000 graphs to perform cypher queries.
> I am using neo4j 2.1.5 for windows.
> Eclipse Luna SR1 for windows.
> jdk-7u71-windows-x64
> 
> The code is:
> __________________________
> public class CriacaoNeo
> {
> 
>       public enum NodeLabels implements Label
>       {
>         SUMMARY, GRAPHS, ATTRIBUTES, ACTIVITY, ENTITY, VALUES 
>       }
>       
>       public enum RelTypes implements RelationshipType
>       {                 
>          SUMMARY,
>          USED, //atividade usou entidade
>          GENERATED,//entidade foi gerado por atividade
>          DERIVED,//entidade foi derivada de entidade
>          INFORMED, //atividade foi disparado por atividade
>          
>            GHOST,
>          ATTRIB,
>          VAL
>       }
> 
>       private static final String DB_GRAFOS = "c:/neo4j/base/NGrafos";
>       private static final String DB_SUMARIO = "c:/neo4j/base/NSumario";
>       private GraphDatabaseService graphDbG;
>       private GraphDatabaseService graphDbS;
>       public static long idCabecaS;
>       public static long idCabecaG;
>       public static long idCabecaA;
>       
>       public static void main(String[] args) 
>       {
>               CriacaoNeo grafo = new CriacaoNeo();
>                 grafo.setUp();
>                 grafo.shutdown();
>               
> 
>       }
>       
>       public void setUp()
>       {
>          deleteFileOrDirectory( new File( DB_GRAFOS ) );
>          deleteFileOrDirectory( new File( DB_SUMARIO ) );
>          graphDbG = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder( 
> DB_GRAFOS )
>                                                      .setConfig( 
> GraphDatabaseSettings.node_keys_indexable, "Cod" )
>                                                      .setConfig( 
> GraphDatabaseSettings.node_keys_indexable, "Elem" )
>                                                      .setConfig( 
> GraphDatabaseSettings.relationship_keys_indexable, "INFORMED" )
>                                                      .setConfig( 
> GraphDatabaseSettings.relationship_keys_indexable, "USED" )
>                                                      .setConfig( 
> GraphDatabaseSettings.relationship_keys_indexable, "GENERATED" )
>                                                      .setConfig( 
> GraphDatabaseSettings.relationship_keys_indexable, "DERIVATED" )
>                                                      .setConfig( 
> GraphDatabaseSettings.relationship_keys_indexable, "ATTRIB" )
>                                                      .setConfig( 
> GraphDatabaseSettings.relationship_keys_indexable, "VAL" )
>                                                      .setConfig( 
> GraphDatabaseSettings.node_auto_indexing, "true" )
>                                                      .setConfig( 
> GraphDatabaseSettings.relationship_auto_indexing, "true" )
>                                                      .newGraphDatabase();
>          graphDbS = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder( 
> DB_SUMARIO )
>                                                       .setConfig( 
> GraphDatabaseSettings.node_keys_indexable, "Cod" )
>                                                       .setConfig( 
> GraphDatabaseSettings.node_keys_indexable, "Elem" )
>                                                       .setConfig( 
> GraphDatabaseSettings.relationship_keys_indexable, "INFORMED" )
>                                                       .setConfig( 
> GraphDatabaseSettings.relationship_keys_indexable, "USED" )
>                                                       .setConfig( 
> GraphDatabaseSettings.relationship_keys_indexable, "GENERATED" )
>                                                       .setConfig( 
> GraphDatabaseSettings.relationship_keys_indexable, "DERIVATED" )
>                                                       .setConfig( 
> GraphDatabaseSettings.relationship_keys_indexable, "ATTRIB" )
>                                                       .setConfig( 
> GraphDatabaseSettings.relationship_keys_indexable, "VAL" )
>                                                       .setConfig( 
> GraphDatabaseSettings.node_auto_indexing, "true" )
>                                                       .setConfig( 
> GraphDatabaseSettings.relationship_auto_indexing, "true" )
>                                                       .newGraphDatabase();
> 
> 
>          registerShutdownHook();
>          createNodespaceSumario();
>          createNodespaceGrafosBase();
>          createNodespace1();
>          System.gc();
>          createNodespace2();
>          System.gc();
>          createNodespace3();
>          System.gc();
>          createNodespace4();
>          System.gc();
>       
>       }
> 
>       public void shutdown()
>       {
>          graphDbG.shutdown();
>          graphDbS.shutdown();
>       }
>       public void createNodespaceSumario()
>       {
>          Transaction txS = graphDbS.beginTx();
>          try
>          {                
>                 System.out.println("\nCriando Sumário");
>                 Node cabecaS = graphDbS.createNode();
>                 cabecaS.setProperty("Elem", "SUMMARY");
>                 cabecaS.setProperty("Cod", "S");
>                 cabecaS.addLabel(NodeLabels.SUMMARY);
>                 idCabecaS = cabecaS.getId();
>            
>                 //sumário
>             Node a1 = graphDbS.createNode();
>             a1.addLabel(NodeLabels.ACTIVITY);
>             Node a4 = graphDbS.createNode();
>             a4.addLabel(NodeLabels.ACTIVITY);
>             
>             Node e4 = graphDbS.createNode();
>             e4.addLabel(NodeLabels.ENTITY);
>             Node e9 = graphDbS.createNode();
>             e9.addLabel(NodeLabels.ENTITY);
>             Node e10 = graphDbS.createNode();
>             e10.addLabel(NodeLabels.ENTITY);
>             Node e11 = graphDbS.createNode();
>             e11.addLabel(NodeLabels.ENTITY);
>                     
>             a1.setProperty( "Elem", "A" );
>             a1.setProperty( "Cod", "A1" );
>             a4.setProperty( "Elem", "A" );
>             a4.setProperty( "Cod", "A4" );
>                                     
>             e4.setProperty( "Elem", "E" );
>             e4.setProperty( "Cod", "E4" );
>             e9.setProperty( "Elem", "E" );
>             e9.setProperty( "Cod", "E9" );
>             e10.setProperty( "Elem", "E" );
>             e10.setProperty( "Cod", "E10" );
>             e11.setProperty( "Elem", "E" );
>             e11.setProperty( "Cod", "E11" );
>                
>             cabecaS.createRelationshipTo( a1, RelTypes.SUMMARY );
>             
>             a1.createRelationshipTo( a4, RelTypes.INFORMED);
>             a1.createRelationshipTo( e9, RelTypes.USED);
>             a1.createRelationshipTo( e11, RelTypes.USED);
>             a1.createRelationshipTo( e4, RelTypes.USED);
>             a4.createRelationshipTo( e10, RelTypes.USED);
>             a4.createRelationshipTo( e11, RelTypes.USED);
>             e4.createRelationshipTo( e11, RelTypes.DERIVED);
>             e9.createRelationshipTo( a4, RelTypes.GENERATED);
> 
>             //ATRIBUTO
>             Node atrib = graphDbS.createNode();
>             idCabecaA = atrib.getId();
>             atrib.setProperty("Elem", "ATTRIBUTES");
>             atrib.setProperty("Cod", "At");
>             atrib.addLabel(NodeLabels.ATTRIBUTES);
>             cabecaS.createRelationshipTo(atrib, RelTypes.ATTRIB );
>                     
>             Node name = graphDbS.createNode();
>             name.setProperty("Elem", "Name");
>             name.addLabel(NodeLabels.ATTRIBUTES);
>            
>             Node qtd = graphDbS.createNode();
>             qtd.setProperty("Elem", "Qtd");
>             qtd.addLabel(NodeLabels.ATTRIBUTES);
>             
>             Node weight = graphDbS.createNode();
>             weight.setProperty("Elem", "Weight");
>             weight.addLabel(NodeLabels.ATTRIBUTES);
>             
>             Node type = graphDbS.createNode();
>             type.setProperty("Elem", "Type");
>             type.addLabel(NodeLabels.ATTRIBUTES);
>             
>             Node start = graphDbS.createNode();
>             start.setProperty("Elem", "Start");
>             start.addLabel(NodeLabels.ATTRIBUTES);
>             
>             Node end = graphDbS.createNode();
>             end.setProperty("Elem", "End");
>             end.addLabel(NodeLabels.ATTRIBUTES);
>             
>             Node url = graphDbS.createNode();
>             url.setProperty("Elem", "Url");
>             url.addLabel(NodeLabels.ATTRIBUTES);
>             
>             Node height = graphDbS.createNode();
>             height.setProperty("Elem", "Height");
>             height.addLabel(NodeLabels.ATTRIBUTES);
>             
>             //Valores
>             Node nameXXX = graphDbS.createNode();
>             nameXXX.setProperty("Elem", "XXX");
>             nameXXX.addLabel(NodeLabels.VALUES);
>             
>             Node qtd10 = graphDbS.createNode();
>             qtd10.setProperty("Elem", "10");
>             qtd10.addLabel(NodeLabels.VALUES);
>             
>             Node weight80 = graphDbS.createNode();
>             weight80.setProperty("Elem", "80");
>             weight80.addLabel(NodeLabels.VALUES);
>             
>             Node typeAtom = graphDbS.createNode();
>             typeAtom.setProperty("Elem", "Atom");
>             typeAtom.addLabel(NodeLabels.VALUES);
>             
>             Node start09 = graphDbS.createNode();
>             start09.setProperty("Elem", "09/09/2014");
>             start09.addLabel(NodeLabels.VALUES);
>             
>             Node end11 = graphDbS.createNode();
>             end11.setProperty("Elem", "11/09/2014");
>             end11.addLabel(NodeLabels.VALUES);
>            
>             Node nameEEE = graphDbS.createNode();
>             nameEEE.setProperty("Elem", "EEE");
>             nameEEE.addLabel(NodeLabels.VALUES);
>             
>             Node typeMol = graphDbS.createNode();
>             typeMol.setProperty("Elem", "Mol");
>             typeMol.addLabel(NodeLabels.VALUES);
>            
>             Node urlNeo4j = graphDbS.createNode();
>             urlNeo4j.setProperty("Elem", "www.neo4j.com 
> <http://www.neo4j.com/>");
>             urlNeo4j.addLabel(NodeLabels.VALUES);
>             
>             Node height15 = graphDbS.createNode();
>             height15.setProperty("Elem", "15");
>             height15.addLabel(NodeLabels.VALUES);
>             
>             Node weight5 = graphDbS.createNode();
>             weight5.setProperty("Elem", "5");
>             weight5.addLabel(NodeLabels.VALUES);
>            
>             Node start14 = graphDbS.createNode();
>             start14.setProperty("Elem", "14/09/2014");
>             start14.addLabel(NodeLabels.VALUES);
>            
>             Node end16 = graphDbS.createNode();
>             end16.setProperty("Elem", "16/09/2014");
>             end16.addLabel(NodeLabels.VALUES);
>             
>             Node nameABC = graphDbS.createNode();
>             nameABC.setProperty("Elem", "ABC");
>             nameABC.addLabel(NodeLabels.VALUES);
>            
>             Node nameABCD = graphDbS.createNode();
>             nameABCD.setProperty("Elem", "ABCD");
>             nameABCD.addLabel(NodeLabels.VALUES);
>            
>             Node height180 = graphDbS.createNode();
>             height180.setProperty("Elem", "180");
>             height180.addLabel(NodeLabels.VALUES);
>                     
>             //Rel entre atributos e seus valores
>             atrib.createRelationshipTo(name, RelTypes.ATTRIB);
>             atrib.createRelationshipTo(qtd, RelTypes.ATTRIB);
>             atrib.createRelationshipTo(weight, RelTypes.ATTRIB);
>             atrib.createRelationshipTo(type, RelTypes.ATTRIB);
>             atrib.createRelationshipTo(start, RelTypes.ATTRIB);
>             atrib.createRelationshipTo(end, RelTypes.ATTRIB);
>             atrib.createRelationshipTo(url, RelTypes.ATTRIB);
>             atrib.createRelationshipTo(height, RelTypes.ATTRIB);
>             
>             name.createRelationshipTo(nameXXX, RelTypes.ATTRIB );
>             name.createRelationshipTo(nameABCD, RelTypes.ATTRIB);
>             name.createRelationshipTo(nameABC, RelTypes.ATTRIB);
>             name.createRelationshipTo(nameEEE, RelTypes.ATTRIB);
>             
>             qtd.createRelationshipTo(qtd10, RelTypes.ATTRIB );
>             
>             weight.createRelationshipTo(weight80, RelTypes.ATTRIB );
>             weight.createRelationshipTo(weight5, RelTypes.ATTRIB);
>             
>             type.createRelationshipTo(typeAtom, RelTypes.ATTRIB );
>             type.createRelationshipTo(typeMol, RelTypes.ATTRIB);
>             
>             start.createRelationshipTo(start09, RelTypes.ATTRIB);
>             start.createRelationshipTo(start14, RelTypes.ATTRIB);
>             
>             end.createRelationshipTo(end11, RelTypes.ATTRIB);
>             end.createRelationshipTo(end16, RelTypes.ATTRIB); 
>             
>             url.createRelationshipTo(urlNeo4j, RelTypes.ATTRIB);
>                    
>             height.createRelationshipTo(height15, RelTypes.ATTRIB);
>             height.createRelationshipTo(height180, RelTypes.ATTRIB);
>                   
>             nameXXX.createRelationshipTo(e11, RelTypes.VAL );
>             qtd10.createRelationshipTo(e11, RelTypes.VAL );
>             weight80.createRelationshipTo(e11, RelTypes.VAL );
>       
> ...
> 
> -- 
> 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.

Reply via email to