Hardware and performance

Questionnaire is very slow when access by 100 users

 
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of CoreDev Develop
Questionnaire is very slow when access by 100 users
 

Dear All,

We encounter very slow performance from our moodle server during Mid Term survey. We are using Questionnaire plugin for the survey. The survey has 15 questions combination of MCQ single answer and free text for comment.

The survey is conducted at the end of the Lecture with 120 students all together.  I was standby in the room, to monitor. During the survey, the system response are very slow although I only see around 75 students login during it at the same time. It took about 1 - 2 mins for me to refresh the page, and check. 

Our Moodle version is: 2.3, running on Red Hat 6.4, 64 GB memory, and 32 cores.  The database is running MYSQL server 5, and running on physical server and on its own box.  The application server has the same specs with the database server. We only have 1 application and 1 database server currently. 

At the application server, there are quite number of messages in httpd error_log file:

Can not obtain session lock, referer: http://ourserver/mod/questionnaire/view.php?id=20698

The amount of CPU, Memory and bandwitdh in the application server are normal.

But, at the Database server, there are very high cpu load happening, The memory is ok, only 15%, and network bandwidth are low as well.  There is nothing in the MySQL server log file. I didn't turn on the access log file for MySQL server for performance reason. 

I am not sure where is the bottleneck. I suspect that is MySQL server performance. But maybe I am wrong. How to fine tune my MySql server to have fast responses. 

And, How to do the load testing using Apache JMeter for Questionnaire activities? I know how to do the Load test for quiz but not questionnaire. 

Appreciate for the great help and response. 

Thanks and best Regards,

Yulstar

 

 
Average of ratings: -
Picture of Ken Task
Re: Questionnaire is very slow when access by 100 users
Group Particularly helpful Moodlers

Do you have sessions set for DB or for file?  Set to file.  This wouldn't speed up all that much, but it would reduce the number of hits/queries, etc. going to the DB server.  Now the potential bottle neck would be disk speed.

Also ... have you used mysqltuner for tweaking DB server?

https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl

'spirit of sharing', Ken

 
Average of ratings: -
Picture of CoreDev Develop
Re: Questionnaire is very slow when access by 100 users
 

Thanks Ken.

How do I check if I have sessions set for DB for file? And how to do that. Sorry, I am not very experience. 

I haven't use mysqltuner. I am looking at it now. 

Thanks and best regards,

Yulstar

 
Average of ratings: -
Picture of Ken Task
Re: Questionnaire is very slow when access by 100 users
Group Particularly helpful Moodlers

Use the search box under the Site Administration panel on front page and search for 'sessions'.  That should provide a link and the setting to change along with a suggestion about increasing 'max_allowed_packet' (which probably good advice for other reasons).

'spirit of sharing', Ken

 
Average of ratings: -
Picture of CoreDev Develop
Re: Questionnaire is very slow when access by 100 users
 

Thanks Ken. 

I found it under Server -> session handling, and currently it set store in DB. I will change to store it File. 

I have also tried the mysqlturner, and modified some of the setting in my.cnf, but the performance is still the same. 

So, while checking in the internet I found out this article:

http://dom.as/2006/09/12/mysql-tcp-network-tuning/

This article is suggested to open the max_syn_backlog in the sysctl.conf file from the TCP network. 

I have tried it in my dev. server and it speed up the processing almost three times.  Does you have any experience with max_syn_Backlog? Is there any side impact to moodle?  I plan to implement it on my database server which located internally. 

Thanks a lot for your response. 

Yulstar

 
Average of ratings: -