apache ignite 2.7.5监控指标

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

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

  1. <beans xmlns="http://www.springframework.org/schema/beans"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://www.springframework.org/schema/beans
  4. http://www.springframework.org/schema/beans/spring-beans.xsd">
  5. <!-- Enable annotation-driven caching. -->
  6. <bean name="noOpFailureHandler" class="org.apache.ignite.failure.NoOpFailureHandler"/>
  7. <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
  8. <property name="peerClassLoadingEnabled" value="true"/>
  9. <property name="igniteInstanceName" value="GridA"/>
  10. <property name="clientMode" value="false"/>
  11. <property name="failureDetectionTimeout" value="80000"/>
  12. <property name="clientFailureDetectionTimeout" value="120000"/>
  13. <property name="systemWorkerBlockedTimeout" value="30000" />
  14. <property name="longQueryWarningTimeout" value="3000"/>
  15. <property name="failureHandler" ref="noOpFailureHandler"/>
  16. <property name="metricsLogFrequency" value="#{600 * 10 * 1000}"/>
  17. <property name="rebalanceThreadPoolSize" value="16"/>
  18. <property name="dataStorageConfiguration">
  19. <bean class="org.apache.ignite.configuration.DataStorageConfiguration">
  20. <!-- Redefining the default region's settings -->
  21. <property name="pageSize" value="#{4 * 1024}"/>
  22. <!--<property name="writeThrottlingEnabled" value="true"/>-->
  23. <property name="defaultDataRegionConfiguration">
  24. <bean class="org.apache.ignite.configuration.DataRegionConfiguration">
  25. <property name="persistenceEnabled" value="true"/>
  26. <property name="initialSize" value="#{105L * 1024 * 1024 * 1024}"/>
  27. <property name="name" value="Default_Region"/>
  28. <!--Setting the size of the default region to 4GB. -->
  29. <property name="maxSize" value="#{120L * 1024 * 1024 * 1024}"/>
  30. <property name="checkpointPageBufferSize"
  31. value="#{4096L * 1024 * 1024}"/>
  32. <!--<property name="pageEvictionMode" value="RANDOM_2_LRU"/>-->
  33. </bean>
  34. </property>
  35. <property name="walPath" value="/wal/grid"/>
  36. <property name="walArchivePath" value="/wal/grid/archive"/>
  37. <property name="storagePath" value="/ignite/persistence"/>
  38. <property name="checkpointFrequency" value="180000"/>
  39. <property name="checkpointThreads" value="8"/>
  40. <property name="walMode" value="BACKGROUND"/>
  41. <property name="walSegmentSize" value="#{1L * 1024 * 1024 * 1024}"/>
  42. <!--<property name="authenticationEnabled" value="true"/>-->
  43. </bean>
  44. </property>
  45. <property name="discoverySpi">
  46. <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
  47. <property name="ipFinder">
  48. <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
  49. <property name="multicastGroup" value="224.0.0.180"/>
  50. <property name="multicastPort" value="47514"/>
  51. </bean>
  52. </property>
  53. </bean>
  54. </property>
  55. <property name="communicationSpi">
  56. <bean class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
  57. <property name="messageQueueLimit" value="2048"/>
  58. <property name="socketWriteTimeout" value="10000"/>
  59. <property name="connectionsPerNode" value="10"/>
  60. <property name="usePairedConnections" value="true"/>
  61. <property name="socketReceiveBuffer" value="#{64L * 1024}"/>
  62. </bean>
  63. </property>
  64. </bean>
  65. </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分钟获得如下指标:

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

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

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

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

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

请帮帮我!

暂无答案!

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

相关问题