`
yangzb
  • 浏览: 3506493 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

glassfish:Indexing and Search Service Performance Tuning

    博客分类:
  • Java
阅读更多

Topics:

Bootstrapping Users

During the bootstrap process (indexSvcBootstrap.sh), frequent access to the dIndex might cause some performance issues, resulting in slow creation of accounts. To reduce some of the overhead on dIndex, increase the value of the following jiss.conf parameter:

# optimizeinterval: number of dIndex writes before optimize is done
iss.store.account.optimizeinterval=5000

Higher values cause less frequent optimization of the dIndex, reducing overhead while bootstrapping.

You can also increase the value of the following parameter to 5:

# optimizelevel: default level of optimize (number of segments left)
iss.store.account.optimizelevel=1

Check the iss-indexsvc.log to see how frequently the dIndex is being optimized, and how long it is taking. You should see a log entry similar to the following one:

INFO: SharedWriter.close: optimizing index:/dIndex Time: 123ms

Restful Web Services Searches

Depending on the incoming search rate, you can modify the following parameter in the jiss.conf file to accommodate a higher search rate:

# Size of proxy connection pool in restful web services
iss.rest.proxypool.size=512

The default is currently set to 512. As this value is larger than 100, you need to make sure that the following parameter is added to the IMQ broker config.properties file, if it doesn't already exist:

imq.autocreate.destination.maxNumProducers=-1

Otherwise, Restful Web Services fail with the following error message:

Could not create connection and producer com.sun.messaging.jms.JMSException: \[ADD_PRODUCER_REPLY(19)\] \[C4036\]: A broker error occurred. :\[409\] \[B4183\]: Producer can not be added to destination SearchTopic \[Topic\], limit of 100 producers would be exceeded

Also, once this value goes above 500, the following parameter also needs to increase to accommodate more than 2 * 500 threads in IMQ broker:

imq.jms.max_threads=2000

Setting Up Large Deployments

For any large deployment, using the indexSvcBootstrap.sh command to assign accounts randomly to groups is not the best approach, both for performance and for data management reasons. Instead, you should pre-allocate accounts by using the issadmin.sh --createaccount command, in conjunction with the --accountlist acctfile option, which contains the desired mapping of accounts to groups. Using this approach minimizes the contention between accounts in the dIndex. Using this method, it is possible to cut the bootstrap time of 20,000 accounts by over 15 percent.

Tuning Restful Web Services

This section contains the following topics:

Note
This information was gathered as part of testing on CMT platforms.

Application Server domain.xml File

All configuration changes were applied directly to the main Application Server configuration file, domain.xml. If necessary, the Application Server administrative interface can be used. This configuration file is located in the $INSTALL/domains/domain1/config directory.

Application Server modifications are based on the recommendations from the Application Server Performance Tuning Guide and Scott Oak's blog.

http-listener

This the http-listener entry that is used to accept search requests from the imapd process.

<http-listener acceptor-threads="64" address="10.5.185.213" blocking-enabled="false" default-virtual-server="server" enabled="true" family="inet" id="http-listener-1" port="8070" security-enabled="false" server-name="r54s29-02.red.iplanet.com" xpowered-by="true">
</http-listener>

The acceptor thread value was set to 64 to match the number of virtual processors available. The IP address was added to indicate which network interface is dedicated to ISS web service requests.

request-processing

This entry determines how http requests are processed by the Application Server.

<request-processing header-buffer-length-in-bytes="8192" initial-thread-count="32" request-timeout-in-seconds="30" thread-count="128" thread-increment="8"/>

The initial-thread-count, thread-count, and thread-increment settings are modified to make more efficient use of the 64 virtual processors available on a Sun SPARC Enterprise T5220.

keep-alive Connections

The following keep-alive setting is used. Keep alive connections enable connection re-use, saving resources that would be required to open and close a socket connection for every HTTP request that is received.

<keep-alive max-connections="4096" thread-count="64" timeout-in-seconds="30"/>

The thread count is modified to make more efficient use of the 64 virtual processors available on a Sun SPARC Enterprise T5220.

JVM Options

The following JVM options are added based on advice given in the Scott Oaks blog entry for the Sun SPARC Enterprise T5220 platform

<jvm-options>-server</jvm-options>
<jvm-options>-d64</jvm-options>
<jvm-options>-XX:LargePageSizeInBytes=256m</jvm-options>
<jvm-options>-Xms5120m</jvm-options>
<jvm-options>-Xmx5120m</jvm-options>
<jvm-options>-Xmn1g</jvm-options>
<jvm-options>-XX:+UseParallelGC</jvm-option>
<jvm-options>-XX:+UseParallelOldGC</jvm-options>
<jvm-options>-XX:ParallelGCThreads=16</jvm-options>
<jvm-options>-XX:+AggressiveOpts</jvm-options>


Access Logging

Access logging, which can be disk intensive, is disabled by setting this entry:

<property name="accessLoggingEnabled" value="false"/>

JMQ Broker config.properties File

Non-default configuration settings are added to the bottom of the /var/imq/instances/imqbroker/props/config.properties file.

Java Message Service Threads

Increasing the jms.max_threads used by the ISS jmqbroker enables greater number of requests to be processed in any given time interval. The default is 1000, but this has been determined to be too small a number of threads for this jmqbroker. The jmqbroker handles both indexing and search requests, unlike the jmqbroker used by the Messaging Server's JMQ notification plugin, which handles only indexing requests.

imq.jms.max_threads=2000

Maximum Number of Producers

The default number of message producers that can be created by the jmqbroker is 100. This value is too low to handle the amount of messages that are typically generated by an active Messaging Server deployment supporting more than 10,000 active users. Disabling the setting allows an unlimited number of producers to be created to handle the load.

imq.autocreate.destination.maxNumProducers=-1

JVM Options
In the file /etc/imq/imqbrokerd.conf, the jvm options are specified:

ARGS=-javahome /usr/jdk/latest -vmargs -d64 -vmargs -Xms4096m -vmargs -Xmx4096m 

Allows use of the 64 bit jvm and reserves 4 GB of memory for the jmq broker. Current scalability test runs have the messaging server and the iss jmq broker use a bit more or less than 1.5 GB of jvm heap.

分享到:
评论

相关推荐

    GlassFish:CXF调用错误-----Cannot create a secure XMLInputFactory

    "GlassFish:CXF调用错误-----Cannot create a secure XMLInputFactory" 是一个典型的错误,它涉及到两个关键的技术组件:GlassFish服务器和CXF框架。下面将详细解释这个问题的成因、解决方法以及相关知识点。 ...

    Sun glassfish Performance Tuning Guide

    在IT领域,Sun Glassfish服务器是一款高性能、可扩展且安全的企业级应用服务器,它基于Java平台,由Sun Microsystems开发并维护。《Sun Glassfish性能调优指南》是一份详尽的技术文档,旨在帮助系统管理员、开发者和...

    glassfish:Eclipse GlassFish

    Eclipse GlassFish 关于 Eclipse GlassFish是Eclipse基金会赞助的与。 Eclipse GlassFish 5.1也与Java EE 8兼容。 建筑 先决条件: JDK8 + Maven 3.0.3+ 当前在master分支中,工件正在从OSSRH暂存中拉出。 运行...

    chef-glassfish:管理GlassFish的食谱

    glassfish食谱将安装和配置GlassFish应用程序服务器以及与GlassFish应用程序服务器捆绑在一起的OpenMQ消息代理。 该菜谱还定义了用于创建和配置GlassFish应用程序域和OpenMQ代理实例的资源。 项目中提供了一个带有...

    glassfish:开源Java EE参考实现

    appserver /发行版/glassfish/target/glassfish.zip appserver / distributions / web / target / web.zip 找到分阶段的发行版: appserver /发行版/ glassfish /目标/阶段 appserver /发行版/网站/目标/阶段 ...

    docker-glassfish:适用于Oracle GlassFish 3.1.2.2的Dockerfile

    GlassFish 3 GlassFish是一个开放源代码的应用程序服务器项目,由Sun Microsystems针对Java EE平台启动,现在由Oracle Corporation赞助。 支持的版本称为Oracle GlassFish Server。 GlassFish是免费软件,具有两个...

    glassfish:具有自动缩放功能的GlassFish群集

    具有自动聚类和缩放功能的GlassFish 在部署,集群和扩展方面,Java EE通常看起来像一个黑匣子。 您可以使用域模式下的预配置群集,自动缩放的实例和用于零代码更改部署的标准流程来摆脱这种复杂性。 可以轻松调整...

    Java Web Services: up and running

    《Java Web Services: Up and Running》是一本专为开发者深入理解并实践Java Web服务技术而编写的指南。这本书详尽地介绍了如何构建、部署和运行Java Web服务,旨在帮助读者快速掌握这一领域的核心概念和技术。 ...

    curso_glassfish:玻璃鱼课程

    关于 GlassFish 的基础知识 * 集群的使用 应用程序部署策略 审计和监控 负载平衡管理器 冗余多节点架构 (HADB) 持久会话 管理和高级配置 与数据库服务器的交互 * 安全策略和工具 * ## 链接 管理指南 话题: ...

    技術分享_Glassfish 3.1.2.2 Web Service Memory Leak Workaround1

    Glassfish 3.1.2.2 Web Service Memory Leak Workaround Glassfish 3.1.2.2 中的 Memory Leak 问题可能会导致服务器变慢或无响应。这种问题可能是由于 Web Service 的 Memory Leak 导致的。在此文中,我们将讨论...

    Glassfish Performance Advisor

    ### Glassfish Performance Advisor 知识点详解 #### 一、简介 Glassfish Performance Advisor 是一款专为 Sun Glassfish 应用服务器设计的性能优化工具。它可以帮助管理员实时监控并优化 Glassfish 服务器的运行...

    letsencrypt_glassfish:用于简化Glassfish或Payara Web服务器中Let's Eencrypt证书的安装和维护的脚本

    letsencrypt_glassfish 该脚本可简化Glassfish和Payara Web服务器中“加密加密”证书的安装和维护。 该脚本旨在简化glassfish / payara服务器中的Let's Encrypt证书的安装,并提供一种自动更新服务器上所有Let's ...

    Front_EJB3.1_JSF2.2_PrimeFaces_GlassFish:在 GlassFish v4.1 下使用 PrimeFaces 对 EJB 3.1 和 JSF 2.2 进行实验

    Front_EJB3.1_JSF2.2_PrimeFaces_GlassFish 在 GlassFish v4.1 下使用 PrimeFaces 对 EJB 3.1 和 JSF 2.2 进行实验 使用带有 sakila 演示模式的 MySQL 数据库(参考 sakila-db.zip 进行安装)另见: ://dev.mysql....

    linux下实现glassfish自动启动

    echo "Usage: service glassfish {start|stop|restart}" exit 1 ;; esac exit 0 ``` 这个脚本定义了启动、停止和重启Glassfish域的命令。 2. **赋予执行权限**: ``` sudo chmod +x /etc/init.d/glassfish...

    glassfish网络开发服务器

    6. **安全性**:GlassFish提供了丰富的安全特性,包括SSL/TLS加密、JAAS(Java Authentication and Authorization Service)支持、容器管理的身份验证和授权,以及与其他安全框架的集成。 7. **性能优化**:内置了...

    jakarta.el-3.0.3-API文档-中文版.zip

    Maven坐标:org.glassfish:jakarta.el:3.0.3; 标签:glassfish、jakarta、el、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...

    glassfish-ose-4.0 白皮书

    7. **安全性增强**:GlassFish 4.0强化了安全特性,支持SSL/TLS加密、JAAS(Java Authentication and Authorization Service)以及角色基础的访问控制,确保企业数据的安全传输和访问。 8. **开发者友好**:提供...

    NetBeans IDE and GlassFish developing demo

    【NetBeans IDE与GlassFish开发演示】 在现代的软件开发领域,Java EE(企业版)应用程序的构建常常依赖于强大的集成开发环境(IDE)和应用服务器。本教程将重点介绍如何利用NetBeans IDE和GlassFish服务器进行Web...

    Optimize GlassFish Performance

    Optimize GlassFish Performance

    JMX 在GlassFish中的应用

    #### JMX与GlassFish:深入理解管理与监控 **JMX(Java Management Extensions)**是一种由Sun Microsystems提出并由Java社区推动的标准,旨在为Java应用程序、系统和网络提供一个统一的管理和监控框架。自Java SE ...

Global site tag (gtag.js) - Google Analytics