Ignite客户端启动时间过长
@李玉珏 你好,想跟你请教个问题:
我在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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
客户端节点不能关闭,这个客户端节点就是我的应用程序。 应用程序使用Ignite集群,要么作为client,要么作为server。
回复
最后你是怎么解决的?
复杂sql的查询怎么样应用效率最高?
就像他说的,你可以先把客户端节点关闭,再测试一下。
如果还有问题,你先看下网络情况,比如交换机,防火墙之类的设置等等。
这其实是Ignite跟Hazelcast相比较的一个短板!Ignite启动时间长是因为Ignite把client方式启动的节点也看作是集群的一部分!