简体   繁体   English

如何通过JVM集群进行负载平衡。

[英]How JVM Clustering for load balancing.

Default JVM uses maximum 1.5 GB RAM/JVM Java application. 默认JVM使用最大1.5 GB RAM / JVM Java应用程序。 But my Server have 8 GB. 但是我的服务器有8 GB。 Application still need more RAM. 应用程序仍需要更多RAM。 how to start cluster of JVM single unit server. 如何启动JVM单机服务器集群。

if in case memory increase single JVM garbage collector and other JVM demon goes slow down... what is solution for this.. is right thing JVM clusters??? 如果万一内存增加了单个JVM垃圾收集器,而其他JVM恶魔变慢了……那么解决方案是什么呢?

Application work high configuration. 应用程序工作高配置。 when request start JVM slow down and memory usage 95% to 99% 当请求启动JVM速度变慢并且内存使用率从95%降至99%时

My server configuration. 我的服务器配置。 Linux 4 Core Multi Processors 8 GB RAM no issue for HDD space. Linux 4核心多处理器8 GB RAM硬盘空间没有问题。

Any Solution for this problem?? 这个问题有解决办法吗?

There are a number of solutions. 有许多解决方案。

  • Use a larger heap size (possibly 64-bit JVM) 使用更大的堆大小(可能是64位JVM)
  • Use less heap and more off heap memory. 使用更少的堆,并使用更多的堆内存。 Off heap memory can scale into the TB. 堆外内存可以扩展到TB。
  • Split the JVM into multiple processes. 将JVM分成多个进程。 This is easier for some applications than others. 对于某些应用程序,这比其他应用程序容易。 I tend to avoid this as my applications can't be split easily. 我倾向于避免这种情况,因为我的应用程序很难拆分。

You might want to look into memory grids like: 您可能需要研究如下的内存网格:

We use Coherence to run 3 JVMs on 1 machine, each process is using 1 Gb of the RAM. 我们使用Coherence在1台计算机上运行3个JVM,每个进程使用1 Gb的RAM。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM