Performance hints

Many factors determines the scalability and performance of Opinio. Some of these issues requires understanding of the underlying database structure.

Remember, that the performance of the application is not better than the weakest link. In other words, the weakest item of one of the below:

Other considerations: If you are concerned with network bandwidth, and you have lots of respondents in your surveys, you should be careful with using images on your survey pages. Images consume bandwidth very quickly. A normal survey page will vary from 20 to 100 kilobyte. A single image could be larger than this.

Memory usage is a key item to look out for. Generally, high loads and large surveys (many and complex questions) will cause Opinio to use more memory. Often times, assigning 256 megabyte to Opinio is enough. But under heavy load, 512mb or more is necessary. Especially if you have many questions in your survey. The reason this consumes more memory is that the respondent session is cached to improve performance. This will take more memory the more questions the survey has. The respondent is cleared from cache when all questions are completed, or if the survey is abandoned (after 20 minutes).

To assign more memory to the application, the java virtual machine (the platform Opinio runs on) must be told to allow more memory. The java process is started by the application server.

If you are using Tomcat, open up catalina.bat (or catalina.sh) in the tomcat bin folder, and put this line at the top of the file:

        Windows in the catalina.bat file:
        set CATALINA_OPTS=%CATALINA_OPTS% -Xmx512m

        On linux in the catalina.sh file:
        JAVA_OPTS=" -Xmx512m -Djava.awt.headless=true "
                        

This example sets the Java memory usage to 512mb. Set it to even more if you have enough memory on your server.

See the documentation for your application server if you are not running Tomcat on how to allocate more memory.

Logging may affect performance. If log-level is set to debugging, Opinio will write a large amount of log-statements to the log file. This will slow the server down. The default log-level is info, which will log most user actions (usually one per screen). This level does not cause much performance loss. If your server is operating under extreme conditions (lots of authors and respondents using the server at the same time), there might be a little performance gain by setting log-level to warning. Note that logging at info-level is usually very helpful for the Opinio support staff when diagnosing problems, enabling them to see the history of actions leading to the problem. See Log file for more information about the log file settings.