apache ignite 2.7.5监控指标

zlhcx6iw  于 2021-07-05  发布在  Java
关注(0)|答案(0)|浏览(548)

这是ignite(版本2.7.5)配置,我正在为我的2节点分区集群使用它。

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd">
    <!-- Enable annotation-driven caching. -->

    <bean name="noOpFailureHandler" class="org.apache.ignite.failure.NoOpFailureHandler"/>
    <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="peerClassLoadingEnabled" value="true"/>
        <property name="igniteInstanceName" value="GridA"/>
        <property name="clientMode" value="false"/>
        <property name="failureDetectionTimeout" value="80000"/>
        <property name="clientFailureDetectionTimeout" value="120000"/>
        <property name="systemWorkerBlockedTimeout" value="30000" />
        <property name="longQueryWarningTimeout" value="3000"/>
        <property name="failureHandler" ref="noOpFailureHandler"/>
        <property name="metricsLogFrequency" value="#{600 * 10 * 1000}"/>
        <property name="rebalanceThreadPoolSize" value="16"/>
        <property name="dataStorageConfiguration">
            <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
                <!-- Redefining the default region's settings -->
                <property name="pageSize" value="#{4 * 1024}"/>
                <!--<property name="writeThrottlingEnabled" value="true"/>-->
                <property name="defaultDataRegionConfiguration">
                    <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
                        <property name="persistenceEnabled" value="true"/>
                        <property name="initialSize" value="#{105L * 1024 * 1024 * 1024}"/>
                        <property name="name" value="Default_Region"/>
                        <!--Setting the size of the default region to 4GB. -->
                        <property name="maxSize" value="#{120L * 1024 * 1024 * 1024}"/>
                        <property name="checkpointPageBufferSize"
                                  value="#{4096L * 1024 * 1024}"/>
                        <!--<property name="pageEvictionMode" value="RANDOM_2_LRU"/>-->
                    </bean>
                </property>
                <property name="walPath" value="/wal/grid"/>
                <property name="walArchivePath" value="/wal/grid/archive"/>
                <property name="storagePath" value="/ignite/persistence"/>
                <property name="checkpointFrequency" value="180000"/>
                <property name="checkpointThreads" value="8"/>
                <property name="walMode" value="BACKGROUND"/>
                <property name="walSegmentSize" value="#{1L * 1024 * 1024 * 1024}"/>
                <!--<property name="authenticationEnabled" value="true"/>-->
            </bean>
        </property>

        <property name="discoverySpi">
            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                        <property name="multicastGroup" value="224.0.0.180"/>
                        <property name="multicastPort" value="47514"/>
                    </bean>
                </property>

            </bean>
        </property>
        <property name="communicationSpi">
            <bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
                <property name="messageQueueLimit" value="2048"/>
                <property name="socketWriteTimeout" value="10000"/>
                <property name="connectionsPerNode" value="10"/>
                <property name="usePairedConnections" value="true"/>
                <property name="socketReceiveBuffer" value="#{64L * 1024}"/>
            </bean>
        </property>
    </bean>

</beans>

ignite使用以下jvm参数启动:
/usr/java/jdk1.8.0\u 144/bin/java-xx:+aggressiveopts-server-xms20g-xmx20g-xx:+alwayspretouch-xx:+useg1gc-xx:+cleavengebeforfullgc-xx:+disableexplicitgc-xx:+heapdumponautofmemoryerror-xx:heapdumppath=/etappdata/ignite/logs/prod/etail-prod-ignite76-164/logs-xx:+exitonoutofmemoryerror-xx:+printgcdetails-xx:+printgtimestamps-xx:+printgcdatamps-xx:+usegclogfilerotation-xx:numberofgclogfiles=10-xx:gclogfilesize=100m-xloggc:/etappdata/ignite/logs/prod/etail-prod-ignite76-164/gc.log-xx:+printaptivesizepolicy-xx:+usetlab-verbose:gc -xx:+parallelrefprocenabled-xx:+uselLargePages-xx:+aggressiveopts-djava.net.preferipv4stack=true-djava.net.preferipv4addresses=true-djava.net.preferipv6stack=false-djava.net.preferipv6addresses=false-dcom.sun.management.jmxremote-dcom.sun.management.jmxremote.port=8996-dcom.sun.management.jmxremote.rmi.port=8996-dcom.sun.management.jmxremote.ssl=false-dcom.sun.management.jmxremote.authenticate=false-dcom.sun.management.jmxremote.local.only=false-djava.rmi.server.hostname=etail-prod-ignite76-164-xx:maxdirectmemorysize=4g-javaagent:/tmp/apminsight javaagent prod/apminsight-javaagent.jar-dfile.encoding=utf-8-xx:+useg1gc-dignite\u quiet=false-dignite_success_file=/ignite/apache-ignite-2.7.5-bin/work/ignite_success_0cbecd49-5b7f-4a41-b2f2-42bb66b2ea5c-dcom.sun.management.jmxremote-dcom.sun.management.jmxremote.port=49128-dcom.sun.management.jmxremote.authenticate=false-dcom.sun.management.jmxremote.ssl=false-dignite_home=/ignite/apache-ignite-2.7.5-bin-dignite_prog_name=./bin/ignite.sh-cp/ignite/apache-ignite-2.7.5-bin/libs/:/ignite/apache-ignite-2.7.5-bin/libs/ignite index/:/ignite/apache-ignite-2.7.5-bin/libs/ignite-spring/:/ignite/apache-ignite-2.7.5-bin/libs/licenses/org.apache.ignite.startup.cmdline.commandlinestartup config/my-cache.xml
[注:每个节点有210 gb ram]
如配置中所述,我每100分钟获得如下指标:

[00:33:36,452][INFO][grid-timeout-worker-#67%GridA%][IgniteKernal%GridA] 
Metrics for local node (to disable set 'metricsLogFrequency' to 0)
    ^-- Node [id=92dda713, name=GridA, uptime=01:40:00.019]
    ^-- H/N/C [hosts=10, nodes=10, CPUs=172]
    ^-- CPU [cur=2.13%, avg=2.16%, GC=0%]
    ^-- PageMemory [pages=5535967]
    ^-- Heap [used=6605MB, free=67.75%, comm=20480MB]
    ^-- Off-heap [used=21878MB, free=82.24%, comm=123179MB]
    ^--   sysMemPlc region [used=0MB, free=99.99%, comm=99MB]
    ^--   metastoreMemPlc region [used=0MB, free=99.77%, comm=99MB]
    ^--   Default_Region region [used=21878MB, free=82.2%, comm=122880MB]
    ^--   TxLog region [used=0MB, free=100%, comm=99MB]
    ^-- Ignite persistence [used=281575MB]
    ^--   sysMemPlc region [used=0MB]
    ^--   metastoreMemPlc region [used=unknown]
    ^--   Default_Region region [used=281575MB]
    ^--   TxLog region [used=0MB]
    ^-- Outbound messages queue [size=0]
    ^-- Public thread pool [active=0, idle=0, qSize=0]
    ^-- System thread pool [active=0, idle=6, qSize=0]

问:我应该怎么做才能获得更具体的监控指标?如果我把metricslogfrequency改为1分钟,有什么意义吗?
我应该在配置文件中添加以下内容吗?

<!-- Enable metrics for this data region  -->
<property name="metricsEnabled" value="true"/>

如何查看更多的监视指标,如pagesused、pagesreplace、pagesfillfactor等?
或者我应该在客户端应用程序中添加如下代码:

Ignite ignite = Ignition.ignite("GridA");
List<DataRegionMetrics> dataRegionMetricsList = new ArrayList<>(ignite.dataRegionMetrics());
dataRegionMetricsList.forEach(
                dataRegionMetrics -> LOG.info(dataRegionMetrics.getName() + ": " + dataRegionMetrics.getAllocationRate() + ":"
                        + dataRegionMetrics.getPagesFillFactor() + ":" + dataRegionMetrics.getPagesReplaceRate())
);

请帮帮我!

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题