4

我们正在使用 python 在 Kubernetes (GCP) 上的 Janusgraph 中摄取数据。我们正在做多线程、节点链接、索引,但我们仍然能够在 60 分钟内从 bigquery 中提取 100k(节点)记录。

Kubernetes 规范 - 1 个 Pod,具有 25 个 vCPU 和 150 GiB RAM ids.block-size = 1000 万线程池 - 16 个节点池 - 16 个堆大小 - 4 gb

问题:

  1. 我们可以采取任何其他方法来提高摄取性能,从而减少总体时间。

  2. 我们可以通过 Python 驱动程序使用 Janusgraph 一次创建多少个多个连接。目前我们能够创建 30 个线程(连接),但是当我们增加线程数时,连接要么卡住,要么性能下降。

任何细节/帮助将不胜感激

Gremlin 查询:gV().hasLabel("http://purl.uniprot.org/core/Helix_Annotation").has("id", "http://purl.uniprot.org/uniprot/P06931#SIPC5C5063B7561AB45") .has("node_id", "http://purl.uniprot.org/uniprot/P06931#SIPC5C5063B7561AB45").has("rdf_type", "http://purl.uniprot.org/uniprot/").has( "http://purl.uniprot.org/core/range", "http://purl.uniprot.org/range/22571007582875950tt125tt127").fold().coalesce(unfold(), addV("http:// purl.uniprot.org/core/Helix_Annotation").property("id", "http://purl.uniprot.org/uniprot/P06931#SIPC5C5063B7561AB45").property("node_id", "http://purl. uniprot.org/uniprot/P06931#SIPC5C5063B7561AB45").property("rdf_type", "http://purl.uniprot.org/uniprot/").property("http://purl.uniprot.org/core/range", "http://purl.uniprot.org/range/22571007582875950tt125tt127")).V().hasLabel("http://www.w3.org/1999/ 02/22-rdf-syntax-ns#Statement").has("id", "http://purl.uniprot.org/uniprot/#_kb.P06931_up.annotation_FA85AD309172A9A7").has("node_id", "http ://purl.uniprot.org/uniprot/#_kb.P06931_up.annotation_FA85AD309172A9A7").has("rdf_type", "http://purl.uniprot.org/uniprot/").has("http://purl .uniprot.org/core/attribution", "http://purl.uniprot.org/uniprot/P06931#attribution-AE0E09C5B47CC2714C9061D3806995B4").fold().coalesce(unfold(), addV("http://www. w3.org/1999/02/22-rdf-syntax-ns#Statement").property("id", "http://purl.uniprot.org/uniprot/#_kb.P06931_up.annotation_FA85AD309172A9A7")。属性(“node_id”,“http://purl.uniprot.org/uniprot/#_kb.P06931_up.annotation_FA85AD309172A9A7”).property(“rdf_type”,“http://purl.uniprot.org/uniprot/”)。属性(“http://purl.uniprot.org/core/attribution”,“http://purl.uniprot.org/uniprot/P06931#attribution-AE0E09C5B47CC2714C9061D3806995B4”))

4

1 回答 1

0

您是否尝试过使用 groovy 脚本?我能够在约 10 秒的单线程内将约 5K 节点插入到具有更少 RAM 和 CPU 的 Janusgraph 中。

于 2020-07-02T17:48:01.230 回答