as i see in gentoo system
h323gk gnugk # ulimit
unlimited
i can set it to 20480 with next command:
h323gk gnugk # ulimit -f 20480
i setup
fs.file-max=102024
fs.file-max=This is the number of concurrently open file descriptors throughout the system. It defaults to 8192.
I increased abnormaly
CallSignalHandlerNumber=60
RtpHandlerNumber=30
The number of RTP proxy handling threads. Increase this value only if you experience problems with RTP delay or jitter on a heavily loaded gatekeeper. A special care has to be taken on Windows, at RTP handling threads are subject of the same limit of 64 sockets as signaling threads. Each RTP thread is able to handle at most 32 proxied calls (2 sockets per call).
So my gnugk shoul be able to handle 32x30=960 calls for proxied calls
The number of threads dedicated to handle signaling/H.245 channels (between 1-200). You may increase this number in a heavy loaded gatekeeper. Each thread can process one signaling message at time, so increasing this number will increase call throughput.so each signaling thread is able to handle at most 32 calls.
So my gnugk should be able to handle 32x60 for signalling
and i setup
SocketCleanupTimeout=200
TcpKeepAlive=1
net.ipv4.tcp_keepalive_time=60
net.ipv4.tcp_keepalive_probes=3
net.ipv4.tcp_keepalive_intvl=10
after all this setting
i have this results:
number of ESTABLISHED tcp connection(i belive its for signalling) for gnugk
h323gk ~ # lsof | grep gnugk | grep ESTABLISHED | wc -l
21391
(al most the limit of large_fd_max=24000)
number of file desctiptor for gnugk
h323gk ~ # lsof | grep gnugk | wc -l
68847
number of threads:
h323gk ~ # ps ax | grep gnugk | wc -l
105
number for fd per each thread
h323gk ptlib # for i in `ps ax | grep "/usr/local/bin/gnugk" | grep -v grep | awk {'print $1'}`; do lsof -n -p $i | wc -l ;done
gnugk pid:20816
685
gnugk pid:20817
687
gnugk pid:20818
683
gnugk pid:20819
686
gnugk pid:20820
689
gnugk pid:20821
692
gnugk pid:20822
697
gnugk pid:20823
696
gnugk pid:20824
701
gnugk pid:20825
700
gnugk pid:20826
703
gnugk pid:20827
699
gnugk pid:20828
698
gnugk pid:20829
699
gnugk pid:20830
707
gnugk pid:20831
711
gnugk pid:20832
711
gnugk pid:20833
709
gnugk pid:20834
709
gnugk pid:20835
706
gnugk pid:20836
707
gnugk pid:20837
705
gnugk pid:20838
706
gnugk pid:20839
707
gnugk pid:20840
712
gnugk pid:20841
713
gnugk pid:20842
716
gnugk pid:20843
721
gnugk pid:20844
727
gnugk pid:20845
726
gnugk pid:20846
733
gnugk pid:20847
731
gnugk pid:20848
728
gnugk pid:20849
729
gnugk pid:20850
729
gnugk pid:20851
732
gnugk pid:22154
733
gnugk pid:24919
733
gnugk pid:12351
734
gnugk pid:13011
735
gnugk pid:13122
737
gnugk pid:13123
736
gnugk pid:13124
731
gnugk pid:13125
733
gnugk pid:13126
728
gnugk pid:13127
725
gnugk pid:13128
725
gnugk pid:13129
726
gnugk pid:13130
729
gnugk pid:13131
727
gnugk pid:13132
728
gnugk pid:13133
726
gnugk pid:13134
726
gnugk pid:13135
720
gnugk pid:13136
715
gnugk pid:13137
706
gnugk pid:13138
701
gnugk pid:13139
698
gnugk pid:13140
696
gnugk pid:13141
691
gnugk pid:13142
693
gnugk pid:13143
688
gnugk pid:13144
687
gnugk pid:13145
682
gnugk pid:13146
676
gnugk pid:13147
681
gnugk pid:13148
679
gnugk pid:13149
679
gnugk pid:13150
676
gnugk pid:13151
680
gnugk pid:13152
680
gnugk pid:13153
680
gnugk pid:13154
676
gnugk pid:13155
676
gnugk pid:13156
676
gnugk pid:13157
680
gnugk pid:13158
680
gnugk pid:13159
684
gnugk pid:13160
684
gnugk pid:13161
684
gnugk pid:13162
684
gnugk pid:13163
682
gnugk pid:13164
680
gnugk pid:13165
680
gnugk pid:13166
678
gnugk pid:13167
680
gnugk pid:13168
683
gnugk pid:13169
682
gnugk pid:13170
680
gnugk pid:13171
682
gnugk pid:13172
680
gnugk pid:13173
680
gnugk pid:13174
680
gnugk pid:13175
684
gnugk pid:13176
684
gnugk pid:13177
684
gnugk pid:13178
688
gnugk pid:13179
691
gnugk pid:13525
689
gnugk pid:14816
688
gnugk pid:15449
692
Strange!!
On 10/25/07, Jan Willamowius <jan@xxxxxxxxxxxxxx> wrote:
Hi Dani,
did you make sure your OS can supply enough file descriptors ?
"ulimit -n 20480" on Linux.
Regards,
Jan
Dani Popa wrote:
> Hi All,
> I use gnugk with ActivateFailover=1 with full proxy mode (rtp proxy) and
> gentoo linux with fs.file-max=102024 . It crash if i have more then 130
> calls because of not enough fd The gnugk is compiled with large_fdset=20480
> With 90 calls i have :"lsof | grep gnugk | wc -l" 18494. As it describe
> in gnugk manual the large_fdset should be 10 (= 2 sockets for Q.931 + 2
> sockets for H.245 + 6 sockets for RTP and other stuff) for each call, so for
> 130 calls i need 130*10=1300( supposed i have activated failover with 3
> routes the fd should be at the most 1300*3-3900, but i have 20480 and at 90
> calls it use 18494 file ) .
>
> When it crash i have the follow error in logs:
>
> 2007/10/06 21:29:15.260 0 assert.cxx(108) PWLib Assertion
> fail: Invalid parameter, file ../common/sockets.cxx, line 1405, Error=4
> 2007/10/06 21:29:15.260 0 assert.cxx(108) PWLib Assertion
> fail: Invalid parameter, file ../common/sockets.cxx, line 1405, Error=4
> 2007/10/06 21:29:15.402 0 assert.cxx(108) PWLib Assertion
> fail: Invalid parameter, file ../common/sockets.cxx, line 1405, Error=9
> 2007/10/06 21:29:15.402 0 assert.cxx(108) PWLib Assertion
> fail: Invalid parameter, file ../common/sockets.cxx, line 1405, Error=4
> 2007/10/06 21:29:15.402 0 assert.cxx(108) PWLib Assertion
> fail: Invalid parameter, file ../common/sockets.cxx, line 1405, Error=4
> 2007/10/06 21:29:15.402 0 assert.cxx(108) PWLib Assertion
> fail: Invalid parameter, file ../common/sockets.cxx, line 1405, Error=4
> 2007/10/06 21:29:15.518 0 assert.cxx(108) PWLib Assertion
> fail: Invalid parameter, file ../common/sockets.cxx, line 1405, Error=9
> 2007/10/07 19:01:41.101 0 assert.cxx(108) PWLib Assertion
> fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
> 2007/10/07 19:01:41.117 0 assert.cxx(108) PWLib Assertion
> fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
> 2007/10/07 19:01:41.140 0 assert.cxx(108) PWLib Assertion
> fail: Invalid parameter, file ../common/sockets.cxx, line 1405, Error=24
> 2007/10/07 19:44:06.938 0 assert.cxx(108) PWLib Assertion
> fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
> 2007/10/07 19:44:06.942 0 assert.cxx(108) PWLib Assertion
> fail: Invalid parameter, file ../common/sockets.cxx, line 1405
> 2007/10/07 20:06:30.964 0 assert.cxx(108) PWLib Assertion
> fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
> 2007/10/07 20:22:17.441 0 assert.cxx(108) PWLib Assertion
> fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
> 2007/10/07 20:22:57.402 0 assert.cxx(108) PWLib Assertion
> fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
> 2007/10/07 20:22:57.415 0 assert.cxx(108) PWLib Assertion
> fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
> 2007/10/07 20:24:30.524 0 assert.cxx(108) PWLib Assertion
> fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
> 2007/10/07 20:24:30.548 0 assert.cxx(108) PWLib Assertion
> fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
> 2007/10/07 20:24:30.559 0 assert.cxx(108) PWLib Assertion
> fail: Invalid parameter, file ../common/sockets.cxx, line 1405
> 2007/10/07 20:53:39.825 0 assert.cxx(108) PWLib <91>
> 2007/10/07 20:53:39.827 0 assert.cxx(108) PWLib ^U
> 2007/10/07 20:53:39.892 0 assert.cxx(108) PWLib Assertion
> fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
> 2007/10/07 20:53:39.899 0 assert.cxx(108) PWLib Assertion
> fail: Operating System error, file tlibthrd.cxx, line 827, Error=2`
>
> So i read the source of pwlib : ../common/sockets.cxx, line 1405 and it's
> about file descriptor.
>
> So the next step was to increase the number of fd for gnugk, some like 40k
> and the result was: all calls were falling with disconnect cause 3,
> disconnected by gnugk, and in logs : not enough memory(i have 1G ram
> memory),
>
> 2007/10/07 21:10:06.976 1 ProxyChannel.cxx(3771) RTP RTCP socket
> x.x.x.x:53547 not available - error 7/24: Cannot allocate memory
>
> What can i do or where i'm wrong ?
>
>
>
>
> --
> Dani Popa
--
Jan Willamowius, jan@xxxxxxxxxxxxxx, http://www.gnugk.org/
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________________
Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users
Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users
Homepage: http://www.gnugk.org/
--
Dani Popa
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________________ Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users Homepage: http://www.gnugk.org/