Ignite客户端启动时间过长

发布于 2021-12-01 00:07:53 字数 11722 浏览 910 评论 5

@李玉珏 你好,想跟你请教个问题:

我在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>

可能什么原因,导致这么长的耗时呢? 谢谢。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

妖妓 2021-12-04 19:45:32

客户端节点不能关闭,这个客户端节点就是我的应用程序。 应用程序使用Ignite集群,要么作为client,要么作为server。

琴流音 2021-12-04 19:35:46

回复
最后你是怎么解决的?

多彩岁月 2021-12-04 18:13:54

复杂sql的查询怎么样应用效率最高?

瀞厅☆埖开 2021-12-04 13:30:05

就像他说的,你可以先把客户端节点关闭,再测试一下。

如果还有问题,你先看下网络情况,比如交换机,防火墙之类的设置等等。

无边思念无边月 2021-12-04 07:38:55

这其实是Ignite跟Hazelcast相比较的一个短板!Ignite启动时间长是因为Ignite把client方式启动的节点也看作是集群的一部分!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文