Just a quick question. I have moodle installed and everything is seemingly fine. Had a chat last Thursday with 16 users and the server load shot up and processor use went to 55%.
This is an XP1700 (1.4Ghz) with a gig of ram. Is this normal for the chat client? We'd eventually like to have as many as 60 folks in the chat but I have a feeling that may require a much faster machine and 4 times the memory.
Or is there an alternative? Would disabling logging of chats help? Can that be done?
Any suggestions/explanations appreciated.
Thanks a lot!
3) Start the server like this (from the Unix command line):
php chatd.php --start &
4) Go to a chat room in Moodle and open it as normal.
I would be curious about how many more students you can get chatting and CPU % info if you have it.
Thank you for your post. I am on shared hosting with SSH and took the a chance [for me] to try to start up the "chat daemon" after following the command you posted above.
I got back something like the following,
u12345678:~/moodle/mod/chat > php chatd.php --start &
u12345678:~/moodle/mod/chat > Content-type: text/html
Moodle chat daemon v1.0 on PHP 4.3.10 ($Id: chatd.php,v 1.22 2004/12/15 07:08:31 defacer Exp $)
Error: Function socket_setopt() does not exist.
Possibly PHP has not been compiled with --enable-sockets.
+ Done php chatd.php --start
I know it finally says "php chatd.php ---start" but there is also this "Error: Function socket-setopt() does not exist". Somehow it all does not feel right.
Is there a way to check if the deamon is running properly or do somthing about this "Function socket_setopt()?
Your php installation does not support the feature to open and listen to specific ports on the server, which has to be activated before compilation of the php-software. Chatd depends on this feature. So you won't be able to run chatd until you get a new php version with enabled sockets.
Thanks for your response, although it makes me sad.
Hmmm, I don't know that it was all that much better with load averages peaking around 1.5 and 80% processor usage
There are some pretty graphs of the night at
with the really interesting parts starting at 7pm. These are roughly the same numbers of participants (16 -20) and roughly the same numbers for the standard chat module or the daemon.
Since I run this server and set this customer up it's alright once a week but anywhere else I would imagine this feature would be a deal breaker for a shared server environment.
Any ideas for bringing the server load down?
A 1.4Ghz CPU and 1Gb RAM is not a hugely powerful server in the first place ... still, I didn't think the chat server would have been working as hard as that. I trust you've removed non-essential processes from the server and installed PHP accelerators etc ...?
Another option for scaling up is to set up the chat daemon up on a second server. It was designed to work that way. Just duplicate the whole Moodle directory on the other server, and point it at the same database as the first one, then run the daemon there. In the settings on the main Moodle server, point it to the other server.
Since it's a shared server there are other folks on there busily serving up their static/dynamic sites and going about their CPU eating business =)
It's as pared down and optimized as I know how to make it. ionCube PHP Accelerator is installed.
What do you guys see when the chat has 30 some odd people in it as far as proc use and load average?
PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
10 0 35600K 18716K nanslp 140:36 2.00% 2.00% php
This is at complete idle. No users at all. Is this right? (as in expected behavior)