You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sems/doc/Tuning.txt

60 lines
3.1 KiB

* [1]Main Page
* [2]Related Pages
* [3]Namespaces
* [4]Data Structures
* [5]Files
* [6]Directories
* [7]Examples
Tuning SEMS for high load
For high load, there are several compile and run time options to make
SEMS run smoothly.
When running SEMS, make sure that you have the ulimit for open files
(process.max-file-descriptor) set to an value which is high enough. You
may need to adapt raise the system wide hard limit (on Linux see
/etc/security/limits.conf), or run SEMS as super user. Note that an
unlimited open files limit is not possible, but it is sufficient to set
it to some very high value (e.g. ulimit -n 100000).
There is a compile-time variable that sets a limit on how many RTP
sessions are supported concurrently, this is MAX_RTP_SESSIONS. You may
either add this at compile time to your value, or edit Makefile.defs
and adapt the value there.
SEMS uses one thread per session (processing of the signaling). This
thread sleeps on a mutex (the session's event queue) most of the time
(RTP/audio processing is handled by the [8]AmMediaProcessor threads,
which is only a small, configurable, number), thus the scheduler should
usually not have any performance issue with this. The advantage of
using a thread per call/session is that if the thread blocks due to
some blocking operation (DB, file etc), processing of other calls is
not affected. The downside of using a thread per session is that you
will spend memory for the stack for every thread, which can fill up
your system memory quickly, if you have many sessions. The default for
the stack size is 1M, which for most cases is quite a lot, so if memory
consumption is an issue, you could adapt this in [9]AmThread, at the
call to pthread_attr_setstacksize. Note that, at least in Linux, the
memory is allocated, but if a page is not used, the page is not really
consumed, which means that most of that empty memory space for the
stack is not really consumed anyway. If you allocate more than system
memory for stack, though, thread creation may still fail with ENOMEM.
__________________________________________________________________
Generated on Wed Mar 17 14:34:30 2010 for SEMS by [10]doxygen 1.6.1
References
1. file://localhost/home/stefan/devel/sems/trunk/doc/doxygen_doc/html/index.html
2. file://localhost/home/stefan/devel/sems/trunk/doc/doxygen_doc/html/pages.html
3. file://localhost/home/stefan/devel/sems/trunk/doc/doxygen_doc/html/namespaces.html
4. file://localhost/home/stefan/devel/sems/trunk/doc/doxygen_doc/html/annotated.html
5. file://localhost/home/stefan/devel/sems/trunk/doc/doxygen_doc/html/files.html
6. file://localhost/home/stefan/devel/sems/trunk/doc/doxygen_doc/html/dirs.html
7. file://localhost/home/stefan/devel/sems/trunk/doc/doxygen_doc/html/examples.html
8. file://localhost/home/stefan/devel/sems/trunk/doc/doxygen_doc/html/classAmMediaProcessor.html
9. file://localhost/home/stefan/devel/sems/trunk/doc/doxygen_doc/html/classAmThread.html
10. http://www.doxygen.org/index.html