如何在Memgraph中利用所有CPU核心?

huangapple go评论47阅读模式
英文:

How to utilize all of the CPU cores in Memgraph?

问题

我注意到MAGE内部的算法通常运行的时间较长,但只使用一个CPU核心。我想知道如何充分利用系统上的所有可用核心?我已经查看了文档,但没有找到可以使用的配置标志。

英文:

I've noticed that it's often the case that algorithms inside MAGE are running for a longer period of time but using only one CPU core. I'd like to know how to leverage all available cores on the system? I've checked the docs, but I didn't find any config flags that would could be used.

答案1

得分: 1

免责声明:我是Memgraph的联合创始人和首席技术官。

mage 内的所有算法首先都有串行实现。 并行(和/或并发)代码通常很难保证正确性,并且比串行代码更高效。 但是,Memgraph团队的目标是为mage 内的每个算法提供并行实现。 换句话说,每个算法都需要一个特定的实现来使用服务器上的所有可用资源。 此外,还有一些算法的Memgraph cuGraph实现,利用服务器上连接的GPU(如果有的话)。

更广泛地说,在Memgraph内执行的单个查询是单线程的(截至撰写时间,2023年07月02日)。 有一个计划支持“intraquery”并行化,但这也将仅限于特定的Cypher子句。 特定的mage 算法始终需要特别小心,以使其利用所有可用的计算资源。

英文:

DISCLAIMER: I'm the co-founder and CTO at Memgraph

All algorithms inside mage have serial implementations in the first place. Parallel (and/or concurrent) code can often be tricky to get correct and more performant than serial code. But, the Memgraph team aims to provide parallel implementations for every algorithm inside mage. In other words, each algorithm requires a specific implementation to use all available resources on the server. In addition, there are Memgraph cuGraph implementations of some algorithms that utilize the GPU attached to the server (if there is one).

More broadly, the execution of a single query inside Memgraph is a single thread (at the time of writing, 2023-07-02). There is a plan to support "intraquery" parallelization, but that will also be limited to specific Cypher clauses. Specific mage algorithms will always require special care to make them leverage all available compute resources.

huangapple
  • 本文由 发表于 2023年6月29日 00:50:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/76575245.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定