MeetMe has issues.
Posted: Tue Jun 19, 2007 3:37 pm
So we have done some testing to try and work through a number of the deadlocks that have been popping up in Asterisk on higher loaded Vicidial systems. We did this by compiling Asterisk with all debugging on and no optimizations and ran vicidial in performance testing mode with 50 agents at 20 to 1 ratio in a virtualized xen machine.
What we have found is that app_meetme is not well written at all and its no wonder that app_conference does so much better. They lock the linked list that holds the configurations for all of the conferences just about every time they are playing a sound file. This means that when a person enters a conference all conferences have their configs locked while it plays the entering sound file. Same on exit. They also lock all of the configs when one conference has some setting changed. On top of that they lock the list while outputting to the log file or when sending a manager event. All of this works out in the end because there is only one lock so when one thread is done using it the next guy gets it, but while it is working its way out more stuff is piling up. The problem gets worse as there are more conferences added to the list.
We are still looking into using Callweaver instead of Asterisk but if that does not pan out we will be looking into improving the locking in app_meetme or fixing the deadlocks in app_conference. We have already done some minor improvements to app_meetme to reduce the amount of time things are locked and removed some possible deadlocks as well (they were locking then calling a function that tries to lock on the same lock) but this was just a drop in the bucket. If we continue with this we plan on making a lock for each of the conferences as well as the linked list and only locking the list on insertion, deletion, and traversal.
What we have found is that app_meetme is not well written at all and its no wonder that app_conference does so much better. They lock the linked list that holds the configurations for all of the conferences just about every time they are playing a sound file. This means that when a person enters a conference all conferences have their configs locked while it plays the entering sound file. Same on exit. They also lock all of the configs when one conference has some setting changed. On top of that they lock the list while outputting to the log file or when sending a manager event. All of this works out in the end because there is only one lock so when one thread is done using it the next guy gets it, but while it is working its way out more stuff is piling up. The problem gets worse as there are more conferences added to the list.
We are still looking into using Callweaver instead of Asterisk but if that does not pan out we will be looking into improving the locking in app_meetme or fixing the deadlocks in app_conference. We have already done some minor improvements to app_meetme to reduce the amount of time things are locked and removed some possible deadlocks as well (they were locking then calling a function that tries to lock on the same lock) but this was just a drop in the bucket. If we continue with this we plan on making a lock for each of the conferences as well as the linked list and only locking the list on insertion, deletion, and traversal.