2
回答
Ignite客户端启动时间过长
滴滴云服务器,限时包月0.9元,为开发者而生>>>   
@李玉珏 你好,想跟你请教个问题:

我在windows开发机上执行Ignite ignite = Ignition.start("config_poc.xml")这个条语句时,每次耗时都要10s以上。远端Ignite集群是在两台高性能的物理机上的两个节点。

控制台打印:

>>> Start ignite node.
2016-06-23 08:49:02 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:316)] Loading XML bean definitions from URL [file:/C:/code/target/classes/config_poc.xml]
2016-06-23 08:49:02 INFO [org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:510)] Refreshing org.springframework.context.support.GenericApplicationContext@3ffcd140: startup date [Thu Jun 23 08:49:02 CST 2016]; root of context hierarchy
六月 23, 2016 8:49:02 上午 java.util.logging.LogManager$RootLogger log
严重: Failed to resolve default logging config file: config/java.util.logging.properties
[08:49:02]    __________  ________________
[08:49:02]   /  _/ ___/ |/ /  _/_  __/ __/
[08:49:02]  _/ // (7 7    // /  / / / _/   
[08:49:02] /___/\___/_/|_/___/ /_/ /___/  
[08:49:02]
[08:49:02] ver. 1.6.0#20160518-sha1:0b22c45b
[08:49:02] 2016 Copyright(C) Apache Software Foundation
[08:49:02]
[08:49:02] Ignite documentation: http://ignite.apache.org
[08:49:02]
[08:49:02] Quiet mode.
[08:49:02]   ^-- To see **FULL** console log here add -DIGNITE_QUIET=false or "-v" to ignite.{sh|bat}
[08:49:02]
[08:49:02] OS: Windows Server 2008 R2 6.1 amd64
[08:49:02] VM information: Java(TM) SE Runtime Environment 1.8.0_65-b17 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.65-b01
[08:49:02] Initial heap size is 64MB (should be no less than 512MB, use -Xms512m -Xmx512m).
[08:49:03] Configured plugins:
[08:49:03]   ^-- None
[08:49:03]
[08:49:05] Security status [authentication=off, tls/ssl=off]
[08:49:18] Performance suggestions for grid  (fix if possible)
[08:49:18] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[08:49:18]   ^-- Decrease number of backups (set 'backups' to 0)
[08:49:18]
[08:49:18] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[08:49:18]
[08:49:18] Ignite node started OK (id=f5b784c9)
[08:49:18] Topology snapshot [ver=61, servers=2, clients=1, CPUs=66, heap=2.9GB]

config_poc.xml内容:

<?xml version="1.0" encoding="UTF-8"?>

<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<!--
    Ignite Spring configuration file to startup Ignite cache.

    This file demonstrates how to configure cache using Spring. Provided cache
    will be created on node startup.

    Use this configuration file when running HTTP REST examples (see 'examples/rest' folder).

    When starting a standalone node, you need to execute the following command:
    {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/example-cache.xml

    When starting Ignite from Java IDE, pass path to this file to Ignition:
    Ignition.start("examples/config/example-cache.xml");
-->
<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">
    <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="cacheConfiguration">
            <list>
                <!-- Partitioned cache example configuration (Atomic mode). -->
                <bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="atomicityMode" value="ATOMIC"/>
                    
                    <!-- Set cache mode. -->
                    <property name="cacheMode" value="PARTITIONED"/>
                    
                    <property name="backups" value="1"/>
                    
                    <property name="memoryMode" value="OFFHEAP_TIERED" />
                    
                                                         
                    
                </bean>
            </list>
        </property>
              

        <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
        <property name="discoverySpi">
            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    <!--
                        Ignite provides several options for automatic discovery that can be used
                        instead os static IP based discovery. For information on all options refer
                        to our documentation: http://apacheignite.readme.io/docs/cluster-config
                    -->
                    <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
                    <!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">-->
                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
                        <property name="addresses">
                            <list>
                                <!-- In distributed environment, replace with actual host IP address. -->
                                <value>x.x.x.15:47500..47509</value>
                                <value>x.x.x.16:47500..47509</value>                
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>
    </bean>
</beans>

可能什么原因,导致这么长的耗时呢? 谢谢。
举报
happycool333
发帖于2年前 2回/542阅
顶部