Apache Ignite:StripedExecutor 队列和备份性能
Apache Ignite: StripedExecutor queue and backup performance
我们有一个带有 2 个数据节点和分布式缓存的集群 (Ignite v2.7)。
我们将数据加载到此缓存并开始大量 read/write 操作。集群完美运行。根据 JMX,StripedExecutor 队列为空。
我们在此缓存上启用备份,将数据加载到此缓存并开始大量 read/write 操作。
根据 JMX,StripedExecutor 队列在一个节点上不断增长。 Sys-stripe 线程消耗 CPU,但 StripedExecutor 运行缓慢。
我们使用三种读取操作:
从客户端节点分发 sql,select 形成 xxx,其中 ...
从客户端节点启动计算,
集合 offerSearchResults = ignite.compute(ignite.cluster().forServers()).broadcast(new GetProductOfferJob(), computeTaskData);
GetProductOfferJob 使用 cache.get
来自客户端节点的缓存附近,cache.get
这是备份内部的错误吗?
数据区域配置:
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="systemRegionInitialSize" value="#{100 * 1024 * 1024}"/>
<property name="pageSize" value="16384"/>
<property name="walMode" value="LOG_ONLY"/>
<property name="writeThrottlingEnabled" value="true"/>
<property name="dataRegionConfigurations">
<list>
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="default_data_region"/>
<property name="initialSize" value="#{10L * 1024 * 1024 * 1024}"/>
<property name="maxSize" value="#{50L * 1024 * 1024 * 1024}"/>
<property name="metricsEnabled" value="false"/>
<property name="persistenceEnabled" value="true"/>
</bean>
</list>
</property>
</bean>
</property>
缓存配置:
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="ATTR_VALUE"/>
<property name="dataRegionName" value="default_data_region"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="backups" value="1"/>
<property name="sqlSchema" value="ATTR_VALUE"/>
<property name="onheapCacheEnabled" value="true"/>
<property name="copyOnRead" value="false"/>
<property name="keyConfiguration">
<bean class="org.apache.ignite.cache.CacheKeyConfiguration">
<property name="typeName" value="entity.key.AttributeValueKey"/>
<property name="affinityKeyFieldName" value="segId"/>
</bean>
</property>
<property name="queryEntities">
<list>
<bean class="org.apache.ignite.cache.QueryEntity">
<property name="keyType" value="entity.key.AttributeValueKey"/>
<property name="valueType" value="entity.AttributeValue"/>
<property name="fields">
<map>
<entry key="segId" value="java.lang.String"/>
<entry key="value" value="java.lang.String"/>
<entry key="attrId" value="java.lang.Long"/>
<entry key="entityObjectId" value="java.lang.Integer"/>
</map>
</property>
<property name="keyFields">
<set>
<value>segId</value>
<value>value</value>
<value>attrId</value>
<value>entityObjectId</value>
</set>
</property>
</bean>
</list>
</property>
</bean>
在缓存上启用备份后,集群的负载量增加了一倍。
在 0 个备份的情况下,每个写入是一个节点上的一个操作。
有了 1 个备份,每次写入都是两次操作 - 每个节点一个。
由于负载加倍,集群似乎已经窒息了。我假设您需要添加一些节点来处理这个负载量。
发生这种情况是因为大量日志使系统混乱,即使您的配置中没有日志附加程序也是如此。您可以在 ignite 日志配置中设置更高的日志级别。
我们有一个带有 2 个数据节点和分布式缓存的集群 (Ignite v2.7)。
我们将数据加载到此缓存并开始大量 read/write 操作。集群完美运行。根据 JMX,StripedExecutor 队列为空。
我们在此缓存上启用备份,将数据加载到此缓存并开始大量 read/write 操作。 根据 JMX,StripedExecutor 队列在一个节点上不断增长。 Sys-stripe 线程消耗 CPU,但 StripedExecutor 运行缓慢。
我们使用三种读取操作:
从客户端节点分发 sql,select 形成 xxx,其中 ...
从客户端节点启动计算,
集合 offerSearchResults = ignite.compute(ignite.cluster().forServers()).broadcast(new GetProductOfferJob(), computeTaskData); GetProductOfferJob 使用 cache.get来自客户端节点的缓存附近,cache.get
这是备份内部的错误吗?
数据区域配置:
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="systemRegionInitialSize" value="#{100 * 1024 * 1024}"/>
<property name="pageSize" value="16384"/>
<property name="walMode" value="LOG_ONLY"/>
<property name="writeThrottlingEnabled" value="true"/>
<property name="dataRegionConfigurations">
<list>
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="name" value="default_data_region"/>
<property name="initialSize" value="#{10L * 1024 * 1024 * 1024}"/>
<property name="maxSize" value="#{50L * 1024 * 1024 * 1024}"/>
<property name="metricsEnabled" value="false"/>
<property name="persistenceEnabled" value="true"/>
</bean>
</list>
</property>
</bean>
</property>
缓存配置:
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="ATTR_VALUE"/>
<property name="dataRegionName" value="default_data_region"/>
<property name="cacheMode" value="PARTITIONED"/>
<property name="backups" value="1"/>
<property name="sqlSchema" value="ATTR_VALUE"/>
<property name="onheapCacheEnabled" value="true"/>
<property name="copyOnRead" value="false"/>
<property name="keyConfiguration">
<bean class="org.apache.ignite.cache.CacheKeyConfiguration">
<property name="typeName" value="entity.key.AttributeValueKey"/>
<property name="affinityKeyFieldName" value="segId"/>
</bean>
</property>
<property name="queryEntities">
<list>
<bean class="org.apache.ignite.cache.QueryEntity">
<property name="keyType" value="entity.key.AttributeValueKey"/>
<property name="valueType" value="entity.AttributeValue"/>
<property name="fields">
<map>
<entry key="segId" value="java.lang.String"/>
<entry key="value" value="java.lang.String"/>
<entry key="attrId" value="java.lang.Long"/>
<entry key="entityObjectId" value="java.lang.Integer"/>
</map>
</property>
<property name="keyFields">
<set>
<value>segId</value>
<value>value</value>
<value>attrId</value>
<value>entityObjectId</value>
</set>
</property>
</bean>
</list>
</property>
</bean>
在缓存上启用备份后,集群的负载量增加了一倍。
在 0 个备份的情况下,每个写入是一个节点上的一个操作。
有了 1 个备份,每次写入都是两次操作 - 每个节点一个。
由于负载加倍,集群似乎已经窒息了。我假设您需要添加一些节点来处理这个负载量。
发生这种情况是因为大量日志使系统混乱,即使您的配置中没有日志附加程序也是如此。您可以在 ignite 日志配置中设置更高的日志级别。