Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
indent30px
stylecircle

 

...

 

默认的Joget安装具有最小的性能配置,因为它旨在满足在小型机器(例如本地开发PC)上的安装。

对于服务器上的生产部署,应调整Java虚拟机(JVM),应用程序服务器,数据库和操作系统的性能。实际的真实世界的表现取决于许多因素。对于服务器上的生产部署,应调整的Java虚拟机(JVM),应用程序服务器,数据库和操作系统的性能。实际的真实世界的表现取决于许多因素这些包括部署架构,服务器和网络规格,流程/应用程序的复杂性,不同用户的实际使用模式等。

本文档介绍了性能调优和优化方面的一些最佳实践,以充分利用您的部署。

重要提示:这些建议有助于作为一般性提示和指导,但在实际实践中,这取决于每个部署的独特环境。还有许多在线的资源可以帮助调整Java,应用程序服务器和数据库的性能。还有许多在线的资源可以帮助调整Java的应用程序服务器和数据库的性能。

安装即服务

对于生产部署,您可能需要将Web应用程序服务器(例如Apache Tomcat)作为服务来安装。请参阅相关操作系统上的文档。Joget安装为Windows服务时,可以找到将Tomcat  安装为Windows服务的指南

Java VM配置

Java VM调优

一个重要的配置将是JVM内存分配。如果这太低,系统将耗尽内存。但是,如果设置太高,垃圾收集可能会有相当大的开销。要获得最佳设置,有时可能需要一些试用和错误,具体取决于使用环境。

以下是开始的步骤。您可能希望从1GB的最大堆设置开始,并在需要时增加。  

1.停止Joget。

2.打开并编辑Joget安装目录/ joget-start.bat。

3.修改

 

Code Block
set JAVA设置JAVA_OPTS = -XX:MaxPermSizeXX:MaxPermSize = 128m -Xmx512M -Dwflow.home =./ wflow / -javaagent:javaagent:./ wflow / aspectjweaver-1.8.5.jar 
Code Block
set JAVA设置JAVA_OPTS = -XX:MaxPermSizeXX:MaxPermSize = 256m -Xmx1024M -Dwflow.home =./ wflow / -XX:XX:+ UseConcMarkSweepGC -javaagent:javaagent:./ wflow / aspectjweaver-1.8.5.jar

 

4.保存并启动Joget。

注意:

Please take note should you encounter any of the following OutOfMemory errors:如果遇到以下OutOfMemory错误,请注意:

java.lang.OutOfMemoryError: Java OutOfMemoryError:Java heap space

Increase the maximum heap size 增加最大堆大小-Xmx

java.lang.OutOfMemoryError: PermGen OutOfMemoryError:PermGen space

Increase the maximum permgen size -XX:MaxPermSize增加最大permgen大小-XX:MaxPermSize

java.lang.OutOfMemoryError: GC OutOfMemoryError:GC overhead limit exceeded

Enable the concurrent garbage collector -XX:启用并发垃圾收集器-XX:+ UseConcMarkSweepGC

There are many online resources for further tuning, e.g., 有许多在线资源可供进一步调整,例如  http://www.oracle.com/technetwork/java/performance-138178.html.

...

Web应用程序服务器配置

Apache

...

Tomcat配置

对于Apache Tomcat,请尝试根据估计的请求负载设置maxThreads Connector线程池设置。例如,要将最大线程数设置为1000,请编辑tomcat

...

For Apache Tomcat, try setting the maxThreads Connector thread pool settings based on the estimated request load. For example, to set the maximum number of threads to 1000, edit tomcat_directory / conf / server.xml. Locate the linexml。找到线路

Code Block
    <Connector URIEncoding="UTF-8" port="8080" protocol="HTTP/1.1"   
                   connectionTimeoutconnectionTimeout="20000"   
                   redirectPortredirectPort="8443" />

并添加一个maxThreads =“”等and add a maxThreads="" such as

Code Block
    <Connector URIEncoding="UTF-8" port="8080" protocol="HTTP/1.1" maxThreads maxThreads="1000"  
                   connectionTimeoutconnectionTimeout="20000"   
                   redirectPortredirectPort="8443" />    

This would require a Tomcat restart to take effect.

这将需要Tomcat重新启动才能生效。

网上有很多可用的资源,例如  There are many resources available online, e.g., http://www.itworld.com/networking/83035/tomcat-performance-tuning-tips.

Linux Configuration

Linux配置

Linux / Unix系统对进程可以同时打开的文件数量有限制。达到限制时,会出现“打开的文件太多”的例外情况。大多数发行版的默认值是1024,这对高流量部署来说是不够的。在Linux中,增加ulimit Linux / Unix systems have a limit on the number of files that can be concurrently opened by a process. When the limit is reached, there will be an exception "Too many open files". The default for most distributions is 1024, which will not be enough for high traffic deployments. In Linux, increasing the ulimit 

Code Block
ulimit -n 4096
 

作为解决方法工作,但这只对会话有效。有关永久配置,请参阅文档以获取具体的分发,例如  works as a workaround but this is only valid for the session. For permanent configuration, please refer to documentation for the specific distribution, e.g., http://posidev.com/blog/2009/06/04/set-ulimit-parameters-on-ubuntu/.

...

数据库配置

Database Indexing

Form data tables generated and managed by Joget are prefixed with app_fd. By default, primary keys and foreign keys are automatically generated for these tables where necessary.

However, in more complex apps, there would be more complex database queries that make use of these tables. As such, it is recommended for indexes to be added manually into table columns when required.

MySQL Configuration

数据库索引

通过Joget生成和管理的形式的数据表的前缀为  app_fd默认情况下,必要时会自动为这些表生成主键和外键。

但是,在更复杂的应用程序中,将会有更复杂的数据库查询使用这些表。因此,建议在需要时将索引手动添加到表列中。

MySQL配置

在MySQL中使用InnoDB时,设置适当的InnoDB缓冲池对于大规模性能非常重要。详细信息可以在这里找到:httpWhen using InnoDB in MySQL, setting an appropriate InnoDB Buffer Pool is important for large-scale performance. Details can be found here: http://dev.mysql.com/doc/refman/5.0/en/innodb-buffer-pool.html.

在具有大量数据和查询的环境中,提高性能的一种方法是使用  查询缓存这可以极大地加快查询性能。详细信息可以在In environments with large data and queries, one way to improve performance is to use the query cache. This can help speed up query performance tremendously. Details can be found at http://dev.mysql.com/doc/refman/5.0/en/query-cache.html.找到 

 如果有很多并发请求,您可能需要增加允许的  最大连接数。 You may need to increase the number of maximum connections allowed if there are a lot of concurrent requests. https://dev.mysql.com/doc/refman/5.0/en/too-many-connections.html

通过启用慢速查询日志,可以在MySQL中识别缓慢的查询。这有助于确定可能的索引和优化的区域。It is possible to identify slow queries in MySQL by enabling the slow query log. This helps to identify areas for possible indexing and optimization.
http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html

Clustering and Load Balancing

For large scale and high-availability deployments, clustering and load balancing may need to be implemented using the Large Enterprise Edition. A high-level description is as follows:

集群和负载平衡

对于大规模和高可用性部署,可能需要使用大型企业版来实现集群和负载平衡  高级描述如下:

主要配置实际上是在Web应用程序服务器上完成的,在这种情况下是Tomcat。The main configuration is actually done at the web application server, in this case Tomcat. There's a quite comprehensive documentation for this at http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html.上有相当全面的文档 

你也需要一个负载平衡器。这可能是硬件或软件,为此可以使用Apache Web服务器。使用mod_proxy_balancer模块(You'll need a load balancer as well. This could be hardware or software, and it's possible to use Apache web server for this purpose. Using the mod_proxy_balancer module (http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html), traffic is directed to various Tomcat nodes. Depending on configuration, the approach could be load balanced or failover, and sticky sessions are recommended.

The database and wflow files (configuration/uploaded files) would also have to be shared from a centralized server.

Logging and Troubleshooting

),流量被引导到各种Tomcat节点。根据配置,该方法可以是负载平衡或故障转移,建议使用粘性会话。

数据库和wflow文件(配置/上传文件)也必须从中央服务器共享。

日志记录和故障排除

运行Apache Tomcat时,日志存储在  When running Apache Tomcat, logs are stored in the tomcat_directory / logs directory. In particular, the files   目录中。特别是文件  joget.log,  catalina.out, and 和  localhost.yyyy-MM-dd.log capture information and errors that are generated.

Should you encounter any issues or errors, it is best that the following information is provided when reporting the issue to Enterprise Support or the community forums:

  • Steps to reproduce the issue
  • Error messages (including any possible JavaScript errors) in the browser
  • Copy of the log files mentioned above
  • Screenshot(s) showing the problem
  • Sample app that produces the issue

The more information provided, the faster an issue can be identified and resolved.

Backup and Restore

Backup Data

 捕获生成的信息和错误。

如果您遇到任何问题或错误,最好在向企业支持或社区论坛报告问题时提供以下信息:

  • 重现问题的步骤
  • 错误消息(包括任何可能的JavaScript错误)在浏览器中
  • 上面提到的日志文件的副本
  • 显示问题的屏幕截图
  • 产生问题的示例应用程序

提供的信息越多,问题就越能被识别和解决。

备份还原

备份数据

备份安装:To backup an installation:

  • 备份存储在joget_directory / wflow中的所有配置文件和上传的数据文件 
  • 备份数据库。例如在MySQL中,你可以使用  mysqldump例如在MySQL的中,你可以使用  mysqldump的  工具。

恢复数据

要将数据恢复到安装:

  • 恢复存储在joget_directory / wflow中的所有配置文件和上传的数据文件 
  • 还原数据库。