为 Ignite Compute Grid 设置 RAM 大小
Setting RAM size for Ignite Compute Grid
我需要使用 Ignite Compute Grid 来执行 RAM-heavy 并行计算。
所以我需要将每个ignite节点的可用RAM设置为4GB以上。
但是,我找不到如何设置它。
示例:我在以下代码中的 ProcessIdentifier.getProcessID(i)
方法需要高达 4GB 的 RAM 才能正确执行并 return 一个 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 缓存中存储任何东西并且只使用计算 API,那么只增加 JVM 堆就足够了。要增加它,您可以在 java 进程使用 -Xmx 参数启动时修改 ignite.sh 脚本中的行。
我需要使用 Ignite Compute Grid 来执行 RAM-heavy 并行计算。 所以我需要将每个ignite节点的可用RAM设置为4GB以上。
但是,我找不到如何设置它。
示例:我在以下代码中的 ProcessIdentifier.getProcessID(i)
方法需要高达 4GB 的 RAM 才能正确执行并 return 一个 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 缓存中存储任何东西并且只使用计算 API,那么只增加 JVM 堆就足够了。要增加它,您可以在 java 进程使用 -Xmx 参数启动时修改 ignite.sh 脚本中的行。