ejabberd - Comments for "Errors when trying to enable some Performance Tuning" https://www.ejabberd.im/node/1182 en Check ejabberd log files https://www.ejabberd.im/node/1182#comment-2540 <p>The Ubuntu start script probably reads that options before starting, and the syntax of that file is a little different. I didn't knew Ubuntu packagers made so easy to set new options. </p> <p>To check if Kernel Poll is enabled, check the ejabberd log files. If it is disabled:</p> <pre>Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0] [hipe] [kernel-poll:false] Eshell V5.5.2 (abort with ^G) ...</pre><p> And if it is enabled:</p> <pre>Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0] [hipe] [kernel-poll:true] Eshell V5.5.2 (abort with ^G) ...</pre> Tue, 14 Nov 2006 07:11:02 +0000 mfoss comment 2540 at https://www.ejabberd.im First of all, thanks a https://www.ejabberd.im/node/1182#comment-2527 <p>First of all, thanks a million for your reply, it all makes more sense now. I think i have it working now, the only hard part was finding the config script - /etc/default/ejabberd</p> <p>By default the file looks like this:</p> <pre># Additional options passed to erlang while starting ejabberd. # See erl(3) for more info # default options already passed are: # -noshell -detached #export ERL_OPTIONS="-heart" # To use more than 1024 connections, you will need to set environment variable ERL_M$ #export ERL_MAX_PORTS=1024 # To reduce memory usage, you can set environment variable ERL_FULLSWEEP_AFTER: # But in this case ejabberd may work slower. #export ERL_FULLSWEEP_AFTER=0</pre><p> I modified it like this:</p> <pre># Additional options passed to erlang while starting ejabberd. # See erl(3) for more info # default options already passed are: # -noshell -detached #export ERL_OPTIONS="-heart" # To use more than 1024 connections, you will need to set environment variable ERL_M$ export ERL_MAX_PORTS=50000 # To reduce memory usage, you can set environment variable ERL_FULLSWEEP_AFTER: # But in this case ejabberd may work slower. #export ERL_FULLSWEEP_AFTER=0 # Maximum Number of Erlang Processes export P=25000 # Kernel Polling: +K true export K=true</pre><p> please notice the +P and +K couldn't be used, i got an error starting ejabberd when i use +P=25000 - it said 'bad variable +P'. Will it work like this P=25000? I don't get any errors on starting ejabberd now.</p> <p>Is there a way to check if it accepted the new settings?</p> <p>Thanks again for your help :)</p> Mon, 13 Nov 2006 21:49:25 +0000 jjk107 comment 2527 at https://www.ejabberd.im jjk107 wrote: Both is https://www.ejabberd.im/node/1182#comment-2524 <div class="quote-msg"> <div class="quote-author"><em>jjk107</em> wrote:</div> <p>Both is running fine.</p> <p>the problem is when i try for example: erl -s ejabberd -env ERL_MAX_PORTS 5000</p></div> <p>Note that '-env ERL_MAX_PORTS 5000' is an option for Erlang when it is started. Find the script that starts ejabberd and was installed by APT. It will include something like this:</p> <pre>erl -s ejabberd ...</pre><p>You just need to edit that script and add the new option, so it will look something like:</p> <pre>erl -env ERL_MAX_PORTS 5000 -s ejabberd ...</pre><div class="quote-msg"> <div class="quote-author"><em>jjk107</em> wrote:</div> <p>I get the same error as above mentioned when i try - erl -s ejabberd +K true</p></div> <p>The solution is similar: modify the start script provided by Ubuntu:</p> <pre>erl -env ERL_MAX_PORTS 5000 +K true -s ejabberd ...</pre><div class="quote-msg"> <div class="quote-author"><em>jjk107</em> wrote:</div> <p>My aim is to get kernel polling working, i have managed to successfully apply the patch and complile erlang R11B-1.</p></div> <p>Maybe the Erlang package on Ubuntu already includes Kernel Poll support. The new Erlang R11B-2 includes it, but you must enable before compiling:</p> <pre>./configure --enable-kernel-poll</pre><p> And of course later enable on start with '+K true'.</p> <div class="quote-msg"> <div class="quote-author"><em>jjk107</em> wrote:</div> <p>I also have a win 2003 server with same setup - i also cant get the kernel polling working on there - i havnt read of anybody who actually have it working on windows, hence my reason for ubuntu...</p></div> <p>Does Microsoft Windows support Kernel Poll?</p> Mon, 13 Nov 2006 17:54:05 +0000 mfoss comment 2524 at https://www.ejabberd.im