Archive for the 'Erlang' Category

Entering BSD Land

Tuesday, April 17th, 2007

After long enough, yet another developer has entered into BSD Land. This one took the way by FreeBSD. Right now I’m mostly benchmarking Erlang applications on FreeBSD, which so far is a bit disappointing, since kpoll is disabled for FreeBSD. Apparently FreeBSD has issues with kqueue and pipes, at least according to the OTP folks. I will try to compile the ERTS with kpoll support anyway, and see what happens. An interesting observation so far is that Ejabberd is spending much more time in kernel-space rather than user-space or this FreeBSD connection. The time spent in kernel-space could probably (?) be shortened with the support for kpoll.

UPDATE:
By hacking the configure script and forcing it to compile with kernel polling support on FreeBSD I noticed really nice performance, until the VM hung for quite some time. It seems that the combination of Erlang, FreeBSD and kqueue indeed have issues.

Benchmarking with Tsung

Wednesday, April 4th, 2007

At the moment I’m running a lot of benchmarks with Tsung. The funny thing with this is that I’ve had more problems getting the client machines to cope with the pressure than the server. I’m running two clients, which are hitting a server, trying to get as many active concurrent connections an possible. Not knowing too much about the inner workings of the Linux TCP/IP stack, I’ve so far run in to ENFILE and EADDRINUSE. The first was kinda expected and is solved by bumping up the allowed file descriptors for the Erlang process. The second however, var rather unexpected, since the clients do not bind to any port. It however turned out that the range of local ports available for non-privileged processes were way to narrow. This magic range is however easily changed with sysctl (net.ipv4.ip_local_port_range) or /proc/sys/net/ipv4/ip_local_port_range.

The server has so far suffered from too few file descriptors, but keeps up rather good :)

Erlang Christmas Cup 2005

Wednesday, December 21st, 2005

Today Erlang Christmas Cup 2005 was held at IT University of Göteborg.

"Erlang Christmas cup is a local, annual tournament for intelligent agents. It is part of a semester with intelligent agents and erlang programming as major themes, and open to all students at the IT University. This year’s challenge is to design and implement agents that can play simulated robot soccer (see www.robocup.org) - and to win the local cup. The rules for the game are the same as for the Robocup Simulation league 2D competition, and given in the Robocup soccer server manual."

My project group YAG (me Oscar Hellström, Andreas Hillqvist, Katarina Viklund, Martin Lassbo, Christian Sandén and Emma Utstrand) participated with the team YAST. We won the whole cup, not losing a single match and without the opponents scoring a single goal against us.

The team was built using Erlang and implemented as an intelligent agent. The agent uses a platform built by the project team for this project. The platform is inspired by C. Varela, C Abalde, L Castro and J Guilas On Modeling Agent Systems with Erlang. The platform should not be considered a general agent platform nor a base to build soccer players in Erlang but rather an experiment.

The tournament was a great finish of an interesting project. As usual the working hours has included 36 hour shifts of coding but we usually remember those nights with some warmth in our hearts a few weeks later. However, amount of blog posts goes down dramatically :)

Source code, design specifications and project reports will be available online some time during December.