Java version
Servoy supports both Java 5 and Java 6 (for the serverApplication Server, the clients Smart Client and developerServoy Developer). As Java 6 has numerous performance improvements, so it is preferred over Java 5.
When If the hardware of the in which Servoy is running is 64bit, make sure to also run a 64 bit Java Virtual Machine. When in doubt which version is used, check the Servoy Admin page, under "Servoy Server Home" > "Servoy Server Status" > "JVM Information":
Note |
---|
An 32 bit JVM will allow a max memory of 2 Gb in total, In order to run with larger heap sizes (over 2 Gb) you have to use 64 bit JVM on a 64 bit OS! |
Java Virtual Machine Server mode
Java has 2 distinct operating modes: client mode and server mode. When running in server mode, the startup of the Java process will take longer and initial execution of code will be slower, but after a while the application will perform faster. The server mode is best suited for the Servoy Application Server.
...
Code Block |
---|
# Java Additional Parameters wrapper.java.additional.1=-Djava.awt.headless=true wrapper.java.additional.2=-Duser.dir="C:\Users\pbakker\Desktop\tmp servoyServoy\application_server" wrapper.java.additional.3=-XX:MaxPermSize=128m wrapper.java.additional.4=-server |
Note | ||||
---|---|---|---|---|
| ||||
On Windows 32 bit environments, the Java Runtime Environment does not include support for server mode. In order to take advantage of server mode optimizations on 32 bit windows Windows systems, it is required to install Java Development Kit (JDK) |
...
The maximum heap size setting is set located in {servoy_install}/application_server/servoy_server.sh/.bat, through the "Xmx" setting.
When the Application Server is started as a Service through the setting can be found in {servoy_install}/application_server/service/wrapper.conf, by the name of "wrapper.java.maxmemory".
...
Databases have a max connection poolsize to prevent memory problems, but the default 10 can be too low when using many clients on 1 server.
As rule of thumb, if the active connection is > 70% of the max then set the max higher, its however not advised to have more then 30 connection max. (since databases them self have limits on how much they can handle, postgress for example default 40 max)
The idle connection parameter is just for efficient memory usage, when allow many idle more memory is occupied when idle, low idle means more connections have to be created (which is expensive time wise)
Note |
---|
When noticing performance problems also watch the "performance data" section. At all times the normal Servoy SQL should be below 0.5 seconds not including reporting or search queries. If this is not the case contact an database administrator for index creation. |
...
The Servoy Application Server uses a pool of database connections per configured Database Server.
The maximum number of active and idle connections within a pool is configurable to preserve resources. For example, a single connection could easily take up a couple of Mb, both on the Servoy Application Server side, as well as on the database engine side.
The settings are configurable on the Servoy Admin page, under Database Servers:
The maximum number of active connections is also limited by the maximum number of connections the database itself is configured to allow. For the bundled PostgreSQL database engine, the maximum is 100 connections. However, these 100 connections are for all connections made to the database instance. This means that if there are multiple Database Servers defined on the Servoy Application Server which are all hosted on the same database instance, the max. 100 connections are for all Database Servers combined. This must be taken into account when setting up the maximun number of active connections.
By default, the maximum active connections setting is set to 10. This could be too low when serving may clients from one Application Server or when the clients do many requests to the database. As rule of thumb, if the actual used active connection regularly goes above 70% of the maximum a higher number of maximum active connections should be configured.
When experiencing performance issues, analyse the "Performance Data" page of the Servoy Admin page. This page provides an overview of all queries fired at the database.
At any given time regular SQL statements (Type = Relation, Load foundset) should have an average execution time below 0.5 seconds.
The performance data is sorted by the total time taken to perform the query, being the result of the average time * number of executions.
Especially for SQL statements that are fired often and take up significant time it should be checked if it's possible to optimize the database, for example by creating the relevant indexes.
servoy.webclient.templates.use_local_ids
...
At all times try to keep the Server log free from javascript application errors/excpetions, all application exceptions point to possible problems inside the application!.