Translations of this page:

Optimizing Server Performance

Normally, one of the web server's default configurations for SoSci Survey is perfectly sufficient for 500 or 1000 questionnaires per hour. However, if all that is available is less powerful software (e.g. a laptop as a mobile survey server), or if a larger number of questionnaires are running at the same time, the configuration of the web server has to be optimized slightly.

If a large number of parallel request is expected, using nginx instead of apache2 can save lots of RAM.

Activate write cache

SoSci Survey uses a caching mechanism for all questions and items so that these do not have to be loaded constantly from the database. Furthermore, the next questionnaire page is already sent before responses have been written to the database – this means the participant does not have to wait for an unnecessarily long amount of time.

In the default configuration, SoSci Survey saves data collected in the questionnaire in the database after “Next” is clicked on anyway. This ensures maximal security for the data, but overloads the database somewhat. SoSci Survey therefore offers a Write Caching for Questionnaires. This means questionnaires are saved entirely in cache files and are only written to the database after a time-delay, as soon as the server load allows this. To ensure questionnaires are transmitted regularly to the database, the script for scheduled tasks has to be run at regular intervals.

In terms of performance, it is important that the database can fit indexes in RAM and not have to access the hard disk constantly. If the installation has to hold a lot of questionnaires (over 500,000), it makes sense to modify the storage configuration (Server Preparation I: MySQL Configuration).

Web Server nginx

Many Linux servers use Apache as the program for the web server. Without doubt, this web server is extremely efficient, but requires a lot of storage in the default configuration if a lot of files are accessed by the server at the same time.

The Multi-Processing Module MPM Worker for Apache provides a solution to this – however, a range of modifications to Apache and PHP configurations are necessary to ensure smooth operation.

Another solution is to switch from Apache to nginx, which is an extremely efficient open source web sever. After implementing PHP (PHP FPM), nginx and SoSci Survey work seamlessly together.

en/server/performance.txt · Last modified: 30.06.2021 16:52 by sophia.schauer
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki