java - 为 Ignite Compute Grid 设置 RAM 大小
问题描述
我需要使用 Ignite Compute Grid 来执行大量 RAM 的并行计算。因此,我需要将每个 ignite 节点的可用 RAM 设置为 4GB 以上。
但是,我找不到如何设置它。
示例:我ProcessIdentifier.getProcessID(i)
在以下代码中的方法需要最多 4GB 的 RAM 才能正确执行并返回一个String
对象。
public static void main(String[] args) {
Ignite ignite = Ignition.start();
IgniteCompute compute = ignite.compute();
Collection<IgniteCallable<String>> calls = new ArrayList<>();
for (int i = 0; i<100; i++) {
ProcessIdentifier pi = new ProcessIdentifier(i);
calls.add(pi::getProcessID);
}
//sends the computation of the 100 pi.ProcessIdentifier(i) to the cluster nodes
Collection<String> res = ignite.compute().call(calls);
//print the results
String total = res.toString();
System.out.printf(total);
}
谁能帮我弄清楚?
解决方案
如果您不想在 Ignite 缓存中存储任何内容并仅使用 Compute API,那么只需增加 JVM 堆就足够了。要增加它,您可以在 java 进程开始使用 -Xmx 参数时修改 ignite.sh 脚本中的行。
推荐阅读
- angular8 - 在 Mat-Table 中使用 renderRows 时遇到问题
- python - 在 Python 中直接将文件下载到文件系统
- swift - 快速自动显示键盘
- python - 无法在 CSS 中调整图像大小
- javascript - 导航栏悬停效果 - CSS
- c# - 如何将多个 Json 数组转换为数据集
- python-3.x - 如何在生成随机障碍物的网格中随机设置起始点和结束点?
- c# - 将 URL 从 C# 获取到 HTML
- nuget - 从 nuget.org 搜索时,如何在顶部显示我们的自定义 nuget?
- sql - 计算大查询(分区)中具有不同行的两个日期之间的持续时间