Errors when trying to enable some Performance Tuning

Hi there. I need some help please!

I have 2 virtual machines, both running linux ubuntu server 2.6.17.

on one i install erlang and ejabberd from the packages using apt-get
the second one i installed erlang(i tried R11B-1 and R11B-0) and ejabberd(1.1.2) from source

Both is running fine.

the problem is when i try for example: erl -s ejabberd -env ERL_MAX_PORTS 5000

on both machines i get this error:
----------------------------------------------
Erlang (BEAM) emulator version 5.5.1 [source] [async-threads:0] [kernel-poll:false]

{"init terminating in do_boot",{undef,[{jabberd,start,[]},{init,start_it,1},{init,start_em,1}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()
______________________________________________

i read some suggestions on the web were guys say that erlang doesnt know where the .beam files are of ejabberd? is that the problem, how do i resolve this.

My aim is to get kernel polling working, i have managed to successfully apply the patch and complile erlang R11B-1.

I get the same error as above mentioned when i try - erl -s ejabberd +K true

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...

Any ideas anybody?

jjk107 wrote: Both is

jjk107 wrote:

Both is running fine.

the problem is when i try for example: erl -s ejabberd -env ERL_MAX_PORTS 5000

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:

erl -s ejabberd ...

You just need to edit that script and add the new option, so it will look something like:

erl -env ERL_MAX_PORTS 5000 -s ejabberd ...
jjk107 wrote:

I get the same error as above mentioned when i try - erl -s ejabberd +K true

The solution is similar: modify the start script provided by Ubuntu:

erl -env ERL_MAX_PORTS 5000 +K true -s ejabberd ...
jjk107 wrote:

My aim is to get kernel polling working, i have managed to successfully apply the patch and complile erlang R11B-1.

Maybe the Erlang package on Ubuntu already includes Kernel Poll support. The new Erlang R11B-2 includes it, but you must enable before compiling:

./configure --enable-kernel-poll

And of course later enable on start with '+K true'.

jjk107 wrote:

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...

Does Microsoft Windows support Kernel Poll?

First of all, thanks a

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

By default the file looks like this:

# 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

I modified it like this:

# 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

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.

Is there a way to check if it accepted the new settings?

Thanks again for your help :)

Check ejabberd log files

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.

To check if Kernel Poll is enabled, check the ejabberd log files. If it is disabled:

Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.5.2  (abort with ^G)
...

And if it is enabled:

Erlang (BEAM) emulator version 5.5.2 [source] [async-threads:0] [hipe] [kernel-poll:true]

Eshell V5.5.2  (abort with ^G)
...
Syndicate content