Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Latest insights regarding performance tuning

  • dwight1976
  • dwight1976's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 4 weeks ago #251623 by dwight1976
Hello,

This topic is primarily focused on self-hosted Limesurvey instances.

I read that until some time ago, many posts were published about performance optimization and increasing concurrency. I believe that this was mainly due to the implementation of file-based session information. When participants opened a questionnaire, this temporary information was written to disk.

Looking at the code changes, I have the impression that file-based session information was removed / became optional, and that now session information is saved in the database.

This raises the question, what current recommended practices are regarding performance optimization and improving concurrency. Can we share our thoughts about this very important topic?

Thanks!

Please Log in to join the conversation.

More
1 year 4 weeks ago #251705 by mfavetti
Replied by mfavetti on topic Latest insights regarding performance tuning
So limesurvey either lets php handle session storage or stores the sessions in the database. For me, deploying high availability infrastructure for limesurvey meant that I needed shared session state between application servers. (Alternatively, you could use sticky sessions.) My solution was to have limesurvey use php session storage and then setup php to use redis instead of filesystem for session storage. This is very fast and handles as many application servers as needed.

I'm not sure how high of concurrency you need, but our setup has handled tens of thousands of concurrent survey takers.
The following user(s) said Thank You: DenisChenu, limesurvey.64qde

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
1 year 3 weeks ago - 1 year 3 weeks ago #251727 by DenisChenu
Replied by DenisChenu on topic Latest insights regarding performance tuning
Redis seems a good idea !

Else :
- session directory in tmpfs (one front serveur)
- memcache
- …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
Last edit: 1 year 3 weeks ago by DenisChenu.

Please Log in to join the conversation.

More
1 year 3 weeks ago #251766 by limesurvey.64qde
Replied by limesurvey.64qde on topic Latest insights regarding performance tuning
This sounds very interesting! I understand that configuring such architecture can be quite a hassle to "get it right".

Do you mind sharing how you approached this, also technically?

Please Log in to join the conversation.

More
1 year 3 weeks ago #251769 by jelo

Looking at the code changes, I have the impression that file-based session information was removed / became optional, and that now session information is saved in the database.
 
How did you came to the conclusion that the file- based session was removed from LimeSurvey?
 

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in to join the conversation.

More
1 year 3 weeks ago - 1 year 3 weeks ago #251770 by mfavetti
Replied by mfavetti on topic Latest insights regarding performance tuning
there are so many different ways to implement a high availability infrastructure, and lots of good info out there

I'll just give an overview of what I've setup.

3 layers:

1. load balancing
keepalived for load balancer failover
haproxy for distributing load across application servers

2. application
nginx to proxy php-fpm
php-fpm for limesurvey

3. storage
mariadb for limesurvey rdb
redis for php session storage (i used table based sessions at first, but they weren't performant enough at scale)
nfs for shared storage between application servers (assets, uploads, etc)

infrastructure in each layer is deployed across different regions/zones as needed (at least 2, can scale up as needed)

the basic idea is no single point of failure, automatic failover, and the ability to scale horizontally as needed to meet demand
Last edit: 1 year 3 weeks ago by mfavetti.
The following user(s) said Thank You: DenisChenu, limesurvey.64qde

Please Log in to join the conversation.

More
1 year 3 weeks ago #251771 by limesurvey.64qde
Replied by limesurvey.64qde on topic Latest insights regarding performance tuning
Thanks for sharing these details? Impressive how this enables to scale up to tens of thousands of concurrent interviews.

May I ask how many servers you use for the application and database / redis? What are the specs of these machines?

Please Log in to join the conversation.

More
1 year 3 weeks ago #251773 by mfavetti
Replied by mfavetti on topic Latest insights regarding performance tuning
once you've setup the infrastructure, do some load testing and scale vertically/horizontally as needed for the hardware utilization to be reasonable and your budget allows
The following user(s) said Thank You: limesurvey.64qde

Please Log in to join the conversation.

More
1 year 3 weeks ago - 1 year 3 weeks ago #251784 by limesurvey.64qde
Replied by limesurvey.64qde on topic Latest insights regarding performance tuning
Sounds good. Do you have tips to perform load testing correctly, especially since we aim to test tens of thousands of parallel connections
Last edit: 1 year 3 weeks ago by limesurvey.64qde.

Please Log in to join the conversation.

Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose