将数据放入distributedmap时,Hazelcast速度很慢
作者:互联网
我有两个hazelcast节点(16GB RAM,每个节点4个核心).当我尝试放置到分布式地图时,hazelcast速度非常慢(1904 puts / s),但是如果我关闭一个节点,性能将会提高(30000 puts / s).任何人都可以帮助我提高多节点性能吗?谢谢
解决方法:
请检查您的配置.当数据复制到另一个节点时,必须完成同步备份,结果您的放置查询已完成.这是默认配置.
You can use asynchronous backup to improve performance. But this will hamper the consistency of the system.
有关一致性的更多信息:
在CAP定理的上下文中,Hazelcast是AP产品.因此,“尽力而为的一致性”旨在复制,同步备份和异步备份都是延迟复制模型的实现.如页面中所述;两种选择之间的区别是;
>同步备份,呼叫者被阻止,直到备份副本应用备份更新并将确认发送回呼叫者
>异步备份可以正常工作忘记.
下面,请参阅Hazelcast Reference Manual的部分:
Hazelcast’s replication technique enables Hazelcast clusters to offer high throughput. However, due to temporary situations in the system, such as network interruption, backup replicas can miss some updates and diverge from the primary. Backup replicas can also hit long GC pauses or VM pauses, and fall behind the primary, which is a situation called as replication lag. If a Hazelcast partition primary replica member crashes while there is a replication lag between itself and the backups, strong consistency of the data can be lost.
标签:hazelcast,java 来源: https://codeday.me/bug/20191108/2008219.html