It's almost certain that you'll want to adjust Clearspace system settings from their defaults shortly after you're up and running. In particular, you'll want to keep an eye on caching, but there are other things you can do to ensure that the application is performing as well as possible. Here's a list of what's included:

Adjusting Caches

Client-Side Resource Caching

Server-Side Page Caching

Recommendations for High-Traffic Sites

Adjusting Java Virtual Machine Settings

Other Ways to Tune

Adjusting Caches

Adjusting cache settings is the best way to improve performance. Clearspace uses a set of caches to keep performance high by caching data so that pages can be rendered quickly without directly querying the database.

How Clearspace Uses Caches to Avoid Database Requests

How to Fine Tune Caches

Client-Side Resource Caching

You can guide client-side caching for static resources. These include images, scripts, stylesheets and so on. Caching these resources can help to improve application performance by reducing the number of calls to the Clearspace application server. The tradeoff is that cached data might be out of date. Note that this is for static content; for dynamic content (such as pages), headers are set by default to not cache.

You can set these with a few system properties in the admin console.

Property Description Values
jive.maxAgeFilter.enabled Sets a header that prompts clients (such as browsers) to check the age of their cached resource before requesting a new version. true (default) to enable the filter; false to disable. Having this enabled when you're testing isn't always useful because you usually want to bypass a cache for fresh content.
jive.maxAgeFilter.maxage.seconds Sets the age after which a client-cached resource is considered stale and should be retrieved from the server. A number of seconds. This defaults to 3600 (one hour). This sets Cache-Control: max-age=3600 in the HTTP headers for static content.

Manually Enabling Client-Side Resource Caching

If you're using a version of Clearspace (prior to 2.0.1 and 1.10.6) in which headers supporting client-side caching aren't available, you can probably still configure your web server to set page headers to support client-side caching. For example, if you're using Apache 2.0, you can use the mod_expires module to have the server generate HTTP headers. To do this, add a configuration directive to your main server configuration. For more information on the mod_expires module, see the Apache web site. Here's a configuration example:

# Enable expirations 
ExpiresActive On  
# CSS and JS files are good for two days from the time they were last accessed 
ExpiresByType text/javascript "access plus two days"
ExpiresByType text/css "access plus two days"

Server-Side Page Caching

You can adjust server-side page caching for anonymous users when their having the very freshest content is less of a concern. With server-side caching on, the server caches pages that are assembled dynamically from data and resources. Retrieving a page from the cache can save the time needed to assemble a fresh page. However, if the data that makes up the page has changed, the page in the cache won't be as fresh as a new one would be.

With server-side page caching disabled (and for registered users, whether or not caching is enabled), Clearspace sends its default HTTP headers. With page caching enabled, in addition to the server-side page cache stored in memory, Clearspace also sets the HTTP header in the response to Cache-Control max-age=3600. The value set for max-age is configurable as described below.

You can set these with system properties in the admin console.

Property Description Values
jive.pageCache.enabled Enables server-side page caching. false (default) to disable page caching; true to enable it. When enabled, only anonymous or guest users will receive cached content.
jive.pageCache.maxage.seconds Sets the age after which the server will create a fresh page rather retrieve the page from the cache. Defaults to 60 seconds. This sets Cache-Control: max-age=60 in the HTTP headers for the page.
jive.pageCache.expiration.seconds Sets the number of seconds after which a page will be removed from the cache. Defaults to 30 seconds
jive.pageCache.maxEntries Sets the maximum number of pages that can be maintained in the cache. Note that increasing this value might require that you provide more system resources for Clearspace. Defaults to 1000 entries.

Note that turning on developer mode by setting the jive.devMode property to true will disable the maxAgeFilter setting (effectively setting jive.maxAgeFilter.enable to false). The jive.devMode property is intended for situations when you're developing themes or plugins, In those situations, caching can hinder you from seeing the results of your development work.

Admin Console: System > Management > System Properties

Recommendations for High Traffic Sites

Here are a few recommendations for high-traffic deployments in which most users are anonymous. Anonymous users tend to visit merely to read content rather than contribute. Because they’re anonymous, by default there’s very little about their experience that will be customized. As a result, you can typically afford to serve them cached content rather than freshly rendered dynamic content.

Adjusting Java Virtual Machine (JVM) Settings

As with any Java-based web application, you can sometimes improve performance by assigning particular values to Java Virtual Machine options. You do this typically by editing the start script that you use to start the application server. For example, for Apache Tomcat you can set the JAVA_OPTS value in the catalina.sh or catalina.bat file; for the Clearspace standalone distribution, you edit this value in the start-clearspace.sh or start-clearspace.bat file. While options can vary among VM distributions (not all servers use the HotSpot VM), most of the same options are available across VMs.

Here's a line from a Tomcat start script that shows example values for JVM options:

JAVA_OPTS="-server -Djava.awt.headless=true -Xmx1024m -XX:+UseConcMarkSweepGC 
    -XX:+UseParNewGC -Dsun.rmi.dgc.client.gcInterval=3600000 -XX:MaxPermSize=128m 
    -XX:+PrintGCDetails -Xloggc:/path/to/log/file"

Here are some of the JVM adjustments you might make:

For more on JVM options, see Java HotSpot VM Options or the documentation for the VM you're using.

Other Ways to Tune

Here are a few more ways to get Clearspace running the most efficiently.