compile ejabberd's xml component natively

Bug #318843 reported by Craig
4
Affects Status Importance Assigned to Milestone
ejabberd (Gentoo Linux)
Unknown
Medium
ejabberd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: ejabberd

From Jack Moffit's blog post http://metajack.im/2009/01/18/speed-up-ejabberd/ :

Whenever an XMPP server or client writes stanzas to the wire, it must serialize its internal XML representation to real XML. This serialization process is the biggest consumer of clock cycles in XMPP code. Ejabberd is no exception, but you can make serialization almost ten times faster with this little trick.

Erlang comes with a native code compiler called HiPE (High Performance Erlang). One of the great things about Erlang is that you can mix native modules and byte-compiled modules freely. We're going to native compile the ejabberd XML routines to achieve the speed boost.

First, you'll need some ejabberd source code. The file we want to compile is ejabberd/src/xml.erl. If you installed ejabberd from a package, don't worry. You don't even need to run configure.

Next, go to the directory with xml.erl and run the compiler:

cd ejabberd/src
erlc +native xml.erl

Finally, move the xml.beam file into your ebin directory. On Ubuntu, this is normally /usr/lib/ejabberd/ebin, but it might also be under /usr/local/ejabberd/ebin. Just replace the xml.beam that is already there.

That's it! Now you're XML routines will execute much faster! It would be great if the ejabberd team made this the default for CPU hungry modules

Changed in ejabberd:
status: Unknown → Confirmed
Changed in ejabberd:
status: Confirmed → Invalid
Changed in ejabberd (Gentoo Linux):
status: Invalid → Unknown
Revision history for this message
Rhonda D'Vine (rhonda) wrote :

I don't follow - is this bugreport too old to be relevant anymore, there is /usr/lib/ejabberd/ebin/xml.beam (and also xml_stream.beam) in the ejabberd package shipped even already in hardy. I guess this is sufficient to set this bugreport to invalid, unless you are able to offer additional information on what you want to have changed?

Thanks,
Rhonda

Changed in ejabberd (Ubuntu):
status: New → Incomplete
status: Incomplete → Invalid
Revision history for this message
Konstantin Khomoutov (flatworm) wrote :

I think the bug status was changed automatically as the "Bug Watch Updater" does not appear to be a human ;-)

In any case this bug should be closed. The reason may be this: ejabberd does not have a dedicated maintainer in Ubuntu, and in Debian, where I maintain ejabberd package at present, I also would not introduce the change the bug poster proposed. At least not without having him presented a benchmark of "stock" vs "tweaked" versions of the same ejabberd release, captured for a typical workload.

Changed in ejabberd (Gentoo Linux):
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.