Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Creating huge graphs from xml files
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Pablo Ramirez  
View profile  
 More options Oct 3 2012, 6:25 pm
From: Pablo Ramirez <ramirezsolorz...@gmail.com>
Date: Wed, 3 Oct 2012 15:25:48 -0700 (PDT)
Local: Wed, Oct 3 2012 6:25 pm
Subject: Creating huge graphs from xml files

Hi, I'm working in a project in which we have to create graphs from reading
an xml file, the computer is a Core 2 Duo and 6Gb RAM, running on Windows
takes 30 minutes and 16 minutes on Fedora,
but in other computer Core i5 and Core i7 takes 3 minutes aprox., What can
I do to accelerate the process? Why is taking to much time?

I tried modifing the configuration file neo4j.properties but it has no
effect in the creating process. Any idea about that?

Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Oct 3 2012, 6:48 pm
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Thu, 4 Oct 2012 00:48:21 +0200
Local: Wed, Oct 3 2012 6:48 pm
Subject: Re: [Neo4j] Creating huge graphs from xml files
Can you share more details!

versions used,
code used,
configuration of both machines (hardware, OS, and neo4j config)

probably slow disk (non ssd?)
how much memory has the other machine?

did you try to run a profiler (like visualvm or yourkit)?

etc.

Michael

Am 04.10.2012 um 00:25 schrieb Pablo Ramirez:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pablo Ramirez  
View profile  
 More options Oct 4 2012, 12:07 am
From: Pablo Ramirez <ramirezsolorz...@gmail.com>
Date: Wed, 3 Oct 2012 23:07:13 -0500
Local: Thurs, Oct 4 2012 12:07 am
Subject: Re: [Neo4j] Creating huge graphs from xml files

Neo version: 1.9SNAPSHOT
1st computer:
- Core 2 Duo 2.33 GHz
- 6GB RAM DDR2 666MHz
- HD 500 GB SATAII
- Windows 7 and Fedora Installed in the same computer.
- Windows 7 30 minutes, Fedora 16 minutes

2nd computer:
- Core i5 (4 cores)
- 4GB DDR3 1333MHz
- HD 500 GB SATAII
- Windows7, takes 3 minutes aprox

I'm programming with eclipse IDE
I attached de neo4j configuration file and de code of my application.
What is visualvm and yourkit?

On Wed, Oct 3, 2012 at 5:48 PM, Michael Hunger <

  GraphDbInstance.java
< 1K Download

  GraphNodes.java
8K Download

  neo4j.properties
4K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Oct 4 2012, 2:03 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Thu, 4 Oct 2012 08:02:53 +0200
Local: Thurs, Oct 4 2012 2:02 am
Subject: Re: [Neo4j] Creating huge graphs from xml files

Pablo,

several things.

#0 your properties file contains a lot of unsuitable values for your system size if you add the memory sizes you give for memory-mapped-io it is several times the amount of ram you have, I think for your import you can just leave off the properties file
#1 you should only have one gdb instance for your import otherwise you loose your caches in between.
#2 your tx size is too small (just 1 node or rel) you should only commit (tx.success(); tx.finish(); every 10k nodes/rels and create a new tx)
#3 instead of values and elements list, why not use a map with key-value ?
#4 don't create the rels with cypher if you have an embedded db instance at hand use gdb.getNodeById() if you had stored the actual node-id (which is internal) to your id-mapping somewhere
#5 I doubt that your id lookup works, what you want is either an auto-index on "id" or a manual index (gdb.index().forNodes("node"); index.add(node,"id",id); and the use index.get("id",id).getSingle() for lookup
#6 then use node.createRelationship(node2,type) and rel.setProperty()
#7 same problem with tx size in your case it is one tx per relationship
#8 if you want to use cypher you MUST use parameters for your passed in values (i.e. node-properties or id's to lookup) otherwise cypher has to parse the query for each execution

HTH

Michael

Am 04.10.2012 um 06:07 schrieb Pablo Ramirez:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pablo Ramirez  
View profile  
 More options Oct 4 2012, 2:29 am
From: Pablo Ramirez <ramirezsolorz...@gmail.com>
Date: Thu, 4 Oct 2012 01:29:21 -0500
Local: Thurs, Oct 4 2012 2:29 am
Subject: Re: [Neo4j] Creating huge graphs from xml files

Thank you very mucha Michael, I will to try that.

On Thu, Oct 4, 2012 at 1:02 AM, Michael Hunger <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pablo Ramirez  
View profile  
 More options Oct 5 2012, 8:44 am
From: Pablo Ramirez <ramirezsolorz...@gmail.com>
Date: Fri, 5 Oct 2012 07:44:36 -0500
Local: Fri, Oct 5 2012 8:44 am
Subject: Re: [Neo4j] Creating huge graphs from xml files

Hi,
I've put the creation of nodes and relationships inside one transaction tx
and it taked like 2 minutes.
How can I use the map with key-value when I'm reading from a xml file, and
therefore I don't know how much properties de node has?

The number of properties from a node can be dinamic, the first node could
have 10 properties, the next 15 properties and so on.

On Thu, Oct 4, 2012 at 1:29 AM, Pablo Ramirez <ramirezsolorz...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Oct 5 2012, 8:52 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Fri, 5 Oct 2012 14:52:50 +0200
Local: Fri, Oct 5 2012 8:52 am
Subject: Re: [Neo4j] Creating huge graphs from xml files

what for?
cypher ?
just fill a hashmap with the attribute properties key-value pairs and pass it as named parameter

in core-api you just call setProperty for each attribute

Michael

Am 05.10.2012 um 14:44 schrieb Pablo Ramirez:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pablo Ramirez  
View profile  
 More options Oct 9 2012, 2:03 am
From: Pablo Ramirez <ramirezsolorz...@gmail.com>
Date: Tue, 9 Oct 2012 01:01:52 -0500
Local: Tues, Oct 9 2012 2:01 am
Subject: Re: [Neo4j] Creating huge graphs from xml files

Hi Michael,
What do you want to mean with only one gdb instance?
How can I use a map with key-value?

Thanks Michael.

On Fri, Oct 5, 2012 at 7:44 AM, Pablo Ramirez <ramirezsolorz...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Hunger  
View profile  
 More options Oct 9 2012, 2:13 am
From: Michael Hunger <michael.hun...@neotechnology.com>
Date: Tue, 9 Oct 2012 08:15:35 +0200
Local: Tues, Oct 9 2012 2:15 am
Subject: Re: [Neo4j] Creating huge graphs from xml files

Am 09.10.2012 um 08:01 schrieb Pablo Ramirez <ramirezsolorz...@gmail.com>:

> Hi Michael,
> What do you want to mean with only one gdb instance?

you create two graph-database instances, one for nodes and one for relationships and shutdown in between. Use one for both and shutdown after you're finished.

> How can I use a map with key-value?

In cypher you pass it as a parameter, in core-api it is an individual setProperty, so no map.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »