2

I'm having a problem with the PGX API of Oracle.

I loaded a big graph and I apply successive filters, but after computing some calculations I destroy the temporaries graphs.

GraphChangeSet<Integer> subGraphChangeSet = 
currentSubGraph.createChangeSet();
    list.forEach(v -> subGraphChangeSet.updateVertex((Integer) v.getId())
            .setProperty("BLOCKED", true));

PgxGraph subGraphForRequest = subGraphChangeSet.build();

// ...

PgxGraph subGraphFiltered = subGraphForRequest
                .filter(new VertexFilter("vertex.BLOCKED == true"));

float edges = (float) subGraphFiltered.getNumEdges();

PgqlResultSet results = subGraphFiltered.queryPgql("SELECT label(e), COUNT(*) " +
                "MATCH () -[e]-> () GROUP BY label(e) ");

for (PgxResult result: results)
    map.put(property, (float) result.getLong(2) / edges);

subGraphFiltered.destroy();
subGraphForRequest.destroy();

But I'm having an [ERROR] OutOfMemoryError: QUERY_PGQL failed maximum off-heap size is configured to not exceed 8,192 MBs. exception when I try to perform the query.

So I tried to use the VM OPTS -Xms512m -Xmx4g, but PGX still ignoring those parameters. I even try -XX:-UseGCOverheadLimit but nothing happened. I tried to modify the pgx.conf file in order to change the value of the max_off_heap_size parameter, but nothing happened either.

Martijn
  • 5,491
  • 4
  • 33
  • 41
fingerprints
  • 2,751
  • 1
  • 25
  • 45

1 Answers1

2

After more of research, I found in the doc that we're able to use system properties

System properties

Also, any PGX engine or runtime field can be set via Java system properties by writing -Dpgx.= arguments to the JVM PGX is running on. Note: Setting system properties will overwrite any other configuration. For example, to set the max off-heap size to 256GB, regardless of what another configurations says, use

java -Dpgx.max_off_heap_size=256000 ...

PGX Doc

This work for me.

Community
  • 1
  • 1
fingerprints
  • 2,751
  • 1
  • 25
  • 45