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