[Freeswitch-dev] Question about threading model, Does it restrict the concurrent capability of FS?
Hi All, As I known FS usually use two thread to handle one call, one for inbound and one for outbound. In 32bits system, a process's memory is limited to 2GB, So I think a FS process can create up to 500 threads, and handle 250 call in the same time. Is it right? How if FS run in 64bits system? Best Regards! -- Lei.Tang lei.tlfly@gmail.com
That would be the case if we used standard 8MB stack size, but we do not. Mike On Nov 2, 2009, at 4:14 AM, Lei Tang wrote:
Hi All, As I known FS usually use two thread to handle one call, one for inbound and one for outbound. In 32bits system, a process's memory is limited to 2GB, So I think a FS process can create up to 500 threads, and handle 250 call in the same time. Is it right? How if FS run in 64bits system?
Step 1. TRY IT. We never recommend running on a 32bit system EVER. Even our spec sheet says 64bit is recommended. You should get more than 500 on a 32bit machine if it sets the stack size properly to 240 per thread. /b On Nov 2, 2009, at 3:14 AM, Lei Tang wrote:
Hi All, As I known FS usually use two thread to handle one call, one for inbound and one for outbound. In 32bits system, a process's memory is limited to 2GB, So I think a FS process can create up to 500 threads, and handle 250 call in the same time. Is it right? How if FS run in 64bits system?
Best Regards! -- Lei.Tang lei.tlfly@gmail.com
Hi Michael and Brian, Thanks for your answers. Brian, Did you mean set the thread stack size to 240KB? Is it enough for FS? If thread stack size is 240kB, so FS can create about 4000 threads and handle 2000 concurrent call? 2009/11/2 Brian West <brian@freeswitch.org>
Step 1. TRY IT.
We never recommend running on a 32bit system EVER. Even our spec sheet says 64bit is recommended. You should get more than 500 on a 32bit machine if it sets the stack size properly to 240 per thread.
/b
On Nov 2, 2009, at 3:14 AM, Lei Tang wrote:
Hi All, As I known FS usually use two thread to handle one call, one for inbound and one for outbound. In 32bits system, a process's memory is limited to 2GB, So I think a FS process can create up to 500 threads, and handle 250 call in the same time. Is it right? How if FS run in 64bits system?
Best Regards! -- Lei.Tang lei.tlfly@gmail.com
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Lei.Tang lei.tlfly@gmail.com
freeswitch should set its own stack if you don't have it set, it will also tell you if it should be reset when you start. The limits you state are all theoretical, depends on other limitations other than ram. Mike On Nov 2, 2009, at 9:53 AM, Lei Tang wrote:
Hi Michael and Brian, Thanks for your answers. Brian, Did you mean set the thread stack size to 240KB? Is it enough for FS? If thread stack size is 240kB, so FS can create about 4000 threads and handle 2000 concurrent call?
2009/11/2 Brian West <brian@freeswitch.org> Step 1. TRY IT.
We never recommend running on a 32bit system EVER. Even our spec sheet says 64bit is recommended. You should get more than 500 on a 32bit machine if it sets the stack size properly to 240 per thread.
/b
On Nov 2, 2009, at 3:14 AM, Lei Tang wrote:
Hi All, As I known FS usually use two thread to handle one call, one for inbound and one for outbound. In 32bits system, a process's memory is limited to 2GB, So I think a FS process can create up to 500 threads, and handle 250 call in the same time. Is it right? How if FS run in 64bits system?
Best Regards! -- Lei.Tang lei.tlfly@gmail.com
_______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Lei.Tang lei.tlfly@gmail.com _______________________________________________ FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
You have to watch out some linux will still give out 8MB even when we say DO NOT. So set 'ulimit -s 240' before starting FS. ulimit -c unlimited ulimit -d unlimited ulimit -f unlimited ulimit -i unlimited ulimit -n 999999 ulimit -q unlimited ulimit -u unlimited ulimit -v unlimited ulimit -x unlimited ulimit -s 244 ulimit -l unlimited ulimit -a Try all these /b On Nov 2, 2009, at 9:34 AM, Michael Jerris wrote:
freeswitch should set its own stack if you don't have it set, it will also tell you if it should be reset when you start. The limits you state are all theoretical, depends on other limitations other than ram.
Mike
participants (3)
-
Brian West
-
Lei Tang
-
Michael Jerris