Issue when testing cache store performance

Issue when testing cache store performance

by Jorge Ricardo -
Number of replies: 3

Hello,

I am finishing the deployment of the following on a Dell R630 (2x Xeons 2630 + 96 GB RAM) server running CentOS 8.1


Moodle 3.8.1+

(PHP-FPM) PHP 7.2.11

PostgreSQL 10.6

Apache 2.4.37

Memcached 1.5.9

SELINUX Disabled

So far everything works properly, however I have noticed the following problem when I run a Cache performance test following the following route: Dashboard -> Site administration -> Plugins -> Caching -> Test performance

Whena test of more than 25k requests is executed, the browser stays loading for several seconds and finally stops and returns a completely blank page without the Moodle favicon. However, if run a test for less than 25k request, the page stays loading for a few seconds and finally returns a page with the test result.

Curiously, this problem only occurs on the physical server, I have recreated all the steps in a VM with the same components and all the tests work correctly even with 100k requests.

I have reviewed all possible logs in PHP-FPM, Apache and there are no error messages when this problem occurs.

Any idea what might be happening here or where I could look more closely? I do not attach logs because I have not found any error log related to this problem.

Any ideas are appreciated and thanks in advance for your time!!

Average of ratings: -
In reply to Jorge Ricardo

Re: Issue when testing cache store performance

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Just checking - do you have Debugging turned on (and up to Developer level)?
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Issue when testing cache store performance

by Jorge Ricardo -

Hello Howard,

Thanks for taking your time trying to help me.

I have enabled the Debugging options in Moodle and I got the following error when I run a cache performance test (50k requests)

Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/moodle/cache/stores/memcached/lib.php on line 422

I solved it by modifying the PHP directive max_execution_time (in the file /etc/php.ini) and changing it to 300 seconds.

Then I ran the test for 100k again and got a completely different error and this time the error comes from Apache: Gateway Timeout

The solution for that  error is changing the Timeout directive in Apache to 300, that can be done globally (changing the httpd.conf ) or inside the Virtual Host definition. 

Finally the answer to all is that my workstation Ryzen 7+32 GB of RAM (where I did the test on the VM) shows a better performance than a server with 2x Xeons E5-2630 + 96 GB of RAM)

Thank you for your time Howard and have a great Weekend!

Average of ratings: Useful (3)
In reply to Jorge Ricardo

Re: Issue when testing cache store performance

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Just to note that for a live site 300 seconds is probably a bit much. For most of Moodle's "normal" long-running processes this is all taken care of for you. Clearly nobody bothered with these cache tests (not surprisingly). I wouldn't leave it so high.
Average of ratings: Useful (1)