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:
The server hardware. This seems very obvious, but it cannot be stressed enough. If you have very high loads on your surveys, you may need to upgrade your server. Opinio is disk-intensive, because it needs to store responses constantly. This dictates a fast storage system. If you are running the database on a different server than the application server, then it is most important with a fast disk for the database.
Opinio itself is mostly CPU intensive, so if the database resides on a separate server, you will be well off with a fast CPU on the server running the application.
The network. Without a fast network connection, you may never be able to reach high loads for Opinio. This is especially important if the database is on a separate server - then you will need a fast link between the application server and the database. Also the network link between the application server and the users are important.
The database. A properly tuned database is important to get the most out of your current setup. We have tried to identify all the needed database indexes for fast lookups. But it is difficult to guess at the usage pattern of all users. So if you are using the product differently than how we predicted, then you may have to tune the database in some way or another. Please refer to the tuning section in the documentation for your database.
The JDBC driver. This piece of software provides the connection between Opinio and the database, and is very important. Choose a driver that is proven to work even at high loads. If you are using the built-in database (Apache Derby), then you do not need to obtain a JDBC driver. For any other database, you will need to get one. See installation instructions for how to use other databases systems. For an extensive list of available JDBC drivers: http://industry.java.sun.com/products/jdbc/drivers
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.