2.3 Moodle chat is slow regardless of users

2.3 Moodle chat is slow regardless of users

by Nuno Pinto -
Number of replies: 2

Hello,

I'm running a 2.3 version moodle that will only be upgraded later this year (the client doesn't want any upgrades).

A constant problem we're finding is that when users use the module 'mod/chat/chat_ajax.php' the server becomes really slow, wether it has 3, 4 or 10 users. It really does stop the server from functionning correctly.

In our server's logs we have lines and lines of the same process, sample:

28632 ***** 20 0 319m 38m 7900 R 5.9 0.9 0:00.32 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28626 ***** 20 0 322m 41m 7852 R 5.6 1.0 0:00.35 /usr/bin/php /home/*****/public_html/*****/mod/chat/view.php

28628 ***** 20 0 321m 40m 7808 R 5.6 1.0 0:00.34 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28630 ***** 20 0 318m 38m 7904 R 5.6 0.9 0:00.31 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28633 ***** 20 0 319m 39m 7832 R 5.6 1.0 0:00.31 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28636 ***** 20 0 319m 38m 7876 R 5.6 0.9 0:00.33 /usr/bin/php /home/*****/public_html/*****/my/index.php

28660 ***** 20 0 322m 41m 7924 R 5.6 1.0 0:00.35 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28664 ***** 20 0 315m 34m 7920 R 5.6 0.8 0:00.28 /usr/bin/php /home/*****/public_html/*****/mod/chat/gui_basic/index.php

28674 ***** 20 0 312m 32m 7900 R 5.6 0.8 0:00.27 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28702 ***** 20 0 216m 29m 6892 R 5.6 0.7 0:00.21 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28711 ***** 20 0 215m 28m 6892 R 5.6 0.7 0:00.21 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28729 ***** 20 0 213m 25m 6888 R 5.6 0.6 0:00.17 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28734 ***** 20 0 212m 25m 6888 R 5.6 0.6 0:00.17 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28586 ***** 20 0 323m 43m 8080 R 5.3 1.1 0:00.37 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28613 ***** 20 0 323m 42m 7968 R 5.3 1.0 0:00.35 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28627 ***** 20 0 320m 39m 7804 R 5.3 1.0 0:00.33 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28641 ***** 20 0 315m 34m 7872 R 5.3 0.8 0:00.28 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28653 ***** 20 0 317m 36m 7804 R 5.3 0.9 0:00.30 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28665 ***** 20 0 315m 34m 7920 R 5.3 0.8 0:00.28 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28667 ***** 20 0 316m 35m 7800 R 5.3 0.9 0:00.28 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28678 ***** 20 0 312m 31m 7700 R 5.3 0.8 0:00.25 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28700 ***** 20 0 216m 30m 7352 R 5.3 0.7 0:00.22 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28724 ***** 20 0 211m 24m 7268 R 5.3 0.6 0:00.16 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28725 ***** 20 0 211m 24m 6884 R 5.3 0.6 0:00.16 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28597 ***** 20 0 322m 41m 7904 R 4.9 1.0 0:00.35 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28688 ***** 20 0 216m 30m 7488 S 4.6 0.7 0:00.22 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28736 ***** 20 0 210m 23m 7044 R 4.6 0.6 0:00.14 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28738 ***** 20 0 210m 22m 7016 R 4.6 0.6 0:00.14 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28742 ***** 20 0 208m 21m 7128 R 4.3 0.5 0:00.13 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28771 ***** 20 0 208m 20m 7092 R 4.0 0.5 0:00.12 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28669 ***** 20 0 216m 30m 7488 S 3.6 0.7 0:00.23 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28764 ***** 20 0 207m 20m 7020 R 3.6 0.5 0:00.11 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28785 ***** 20 0 207m 19m 6912 R 3.6 0.5 0:00.11 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28634 ***** 20 0 314m 33m 7936 R 3.3 0.8 0:00.27 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28805 ***** 20 0 204m 17m 6964 R 3.0 0.4 0:00.09 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28796 ***** 20 0 204m 17m 7020 R 2.6 0.4 0:00.08 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28817 ***** 20 0 204m 16m 6932 R 2.6 0.4 0:00.08 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28809 ***** 20 0 203m 16m 6928 R 2.3 0.4 0:00.07 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28577 ***** 20 0 315m 34m 7840 R 1.6 0.8 0:00.26 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28821 ***** 20 0 201m 14m 6956 R 1.6 0.3 0:00.05 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

28824 ***** 20 0 201m 14m 6968 R 1.6 0.3 0:00.05 /usr/bin/php /home/*****/public_html/*****/mod/chat/chat_ajax.php

All this in 1 chat session with 6 users... How can I mitigate this problem?

My server is a VPS with 2 VCPUs and 4 GB of ram.

Best regards,

Nuno Pinto

Average of ratings: -
In reply to Nuno Pinto

Re: 2.3 Moodle chat is slow regardless of users

by Ken Task -
Picture of Particularly helpful Moodlers

Before staring a chat session in a chat room, login via ssh and run 'top' so you can see how much memory is used up without running a chat session.  Then start a chat session in Moodle.   Go back to the ssh window and view top to see how that one chat session is using memory.

Many moons ago discovered chat rooms used up a little less than 500K of memory for each chat room launched.

'spirit of sharing', Ken


In reply to Ken Task

Re: 2.3 Moodle chat is slow regardless of users

by Nuno Pinto -
Here the issues seems to be that 1 chat room instance process is getting called again and again...