Re: Java Heap Space - Vertex.edges


Joe Obernberger
 

Thank you Marc - I tried something like this:
List<Edge> edgeList = traversal.V().has("myId", myId).inE().toList();

myId is an indexed field.  This also runs out of memory if the outE() size is very large.  At least that's what appears to be happening.  The size of the inE is small (less than 10 nodes).  The outE size can be very large.  It seems that we can't have graphs with a large number of edges on a single node.  The graph can also result in very large partition sizes in Cassandra (in my case about 650MBytes):  Seeing this; would I need to redesign the graph?  What I'm trying now is limiting the number of edges on a node, but that seems opposed to why I'm using a graph in the first place.

nodetool tablehistograms graphsource.edgestore
graphsource/edgestore histograms
Percentile      Read Latency     Write Latency          SSTables    Partition Size        Cell Count
                    (micros)          (micros)                             (bytes)
50%                   379.02             35.43              8.00               372                 5
75%                   379.02             42.51              8.00               535                 6
95%                   545.79             51.01              8.00               535                 8
98%                   545.79             51.01              8.00              1109                10
99%                   545.79             51.01              8.00              1916                14
Min                   219.34             20.50              6.00               125                 0
Max                   545.79             51.01              8.00         668489532           4866323

-Joe

On 8/28/2022 4:50 AM, hadoopmarc@... wrote:
Hi Joe,

Can you take a look at this blog from Boxuan Li:  https://li-boxuan.medium.com/janusgraph-deep-dive-part-3-speed-up-edge-queries-3b9eb5ba34f8

In general, it is better to use the TinkerPop API starting with g.V(). This makes sure you do not skip query optimizations. In addition, it makes your code more portable with respect to other TinkerPop-compatible graph systems.

I am not sure though if this will really help for your use case, but give it a try!

Best wishes,     Marc

Virus-free.www.avg.com

Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.