Child pages
  • Tuning the Server

Versions Compared

Key

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

Servoy Application Server Tuning

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

...

.

Java will automatically detect if the machine it is running on is a "capable" machine and automatically run in server or client mode depending. The definition of "capable" may differ from Java version to java version. For Java 6 this means a 2CPU, 2Gb memory machine (http://download.oracle.com/javase/6/docs/technotes/guides/vm/server-class.html ).

On Windows 32 bit environments however, the Java Runtime Environment does not include support for server mode. In order to take advantage of server mode optimizations on 32 bit windows systems, it is required to install Java Development Kit (JDK)

When running

Note
Java server mode on Windows 32-bit environments
Java server mode on Windows 32-bit environments

On Windows 32 bit systems, Java Runtime Environment doesn't come with the support for the server mode. Install Java Development Kit instead.

Memory

Processes in Java, like the Servoy Application Server, need to be told explicitly the maximum of memory they are allowed to use. This setting, the maximum heap size, is important to adjust to the load the Servoy Application Server is to handle.

...

For the Web Client, Servoy generates HTML markup. In order for Servoy to dynamically update only parts of the UI through Ajax, each object in the HTML Markup receives a unique ID. This ID is also placed in the editable Web Client templates.

...

If templates are used to modify the generated HTML markup for Web Clients, then the unique identifiers are to be used, in order to maintain the link between the identifiers in the edited templates and the identifiers used at runtime. Otherwise the local identifiers can be used.

...

In order to enable compression in the tomcat Tomcat instance that is part of the Servoy Application Server, open the file "server.xml" located in {servoy_install}application_server\server\conf\. Locate and locate the Connector:

Code Block
<Connector port="8080"
  protocol="HTTP/1.1"
  maxThreads="500" connectionTimeout="60000"
  redirectPort="8443" useBodyEncodingForURI="true" />

...

Save the edits and restart the Servoy Application Server to let the configuration changes take effect.

It is also possible to handle the compression outside of the Servoy Application Server, for example in an Apache HTTPD Server placed between the Servoy Application Server and the outside world.

Note
Tomcat Compression configuration as of Servoy 6.0
Tomcat Compression configuration as of Servoy 6.0

As of Servoy 6.0, the compression configuration will be enabled by default

 It is also possible to handle the compression outside of the Servoy Application Server, for example in an Apache HTTPD Server placed between the Servoy Application Server and the outside world.

When it comes to Apache HTTPD server, there are two options:

...

When it comes to compression, there are two factors that come into play, the time it takes to do the actual compression and the rate of compression achieved, resulting in quicker downloads to the browser due to smaller size.
This is the difference  This is primary difference between mod_deflate and gzip in Apache HTTPD: while gzip gets a better compression rate than mod_deflate, it takes more time and CPU to perform the compression. In the case of Servoy Web Clients, that, due to it's Ajax driven design, performs a lot (albeit small) requests to the server, the overall performance will be better using mod_deflate.

...