patchmldonkey, a multi-networks file-sharing client - Patches: patch #4293, mldonkey kqueue patch (replace...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #4293: mldonkey kqueue patch (replace select/poll) for FreeBSD (and others)

Submitter:  Mario Sergio Fujikawa Ferreira <lioux>
Submitted:  Wed 10 Aug 2005 02:55:51 AM UTC
   
 
Category:  Improved interfaces Priority:  5 - Normal
Status:  Wont Do Assigned to:  None
Open/Closed:  Closed

(-)Discussion

Sun 20 Nov 2005 01:28:47 AM UTC, comment #2: 

On IRC today:
[02:26] <pango_> spiralvoice: the problem with this patch is that it will not bring expected improvements
[02:27] <pango_> spiralvoice: to scale, it's not enough to use a different API; you must also avoid rebuilding list of sockets all the time, etc.
[02:28] <pango_> and if a rewrite is needed, then better use libevent than kqueue,that's specific to some *BSDs only

spiralvoice <spiralvoice>
Group administrator
Sun 28 Aug 2005 09:08:14 PM UTC, comment #1: 

While I'm personally a bit skeptical that such patch is necessary (by the time mldonkey has so many open sockets at once that such patch is of noticeable benefit, something is probably wrong with connections management), here's a report of what has been said on #mldonkey:

The way to go is probably to use the libevent library (http://www.monkey.org/~provos/libevent), thru the existing Ocaml bindings (http://www.xs4all.nl/~mmzeeman/ocaml/event-doc/Libevent.html).

Benefits:

  • shields the application from the mecanism effectively available on the platform: select(), poll(), kqueue(), epoll(),... Maybe later win32 fibres, etc, etc.
  • will require a major rewrite of basicSocket.ml (and modifications to its client modules), which may be a good thing to reach the expected performance improvements anyway.


pango <mlpango>
Group Member
Wed 10 Aug 2005 02:55:51 AM UTC, original submission:  

keywords: select, poll, kqueue, kevent, FreeBSD, NetBSD, OpenBSD, epoll

MLDonkey can be found on the FreeBSD ports tree under both net/mldonkey and net/mldonkey-devel.

I just wrote a patch against net/mldonkey-devel version 2.6.1 to support kqueue(2) FreeBSD kernel event notification mechanism. It is meant to replace select/poll inside MLDonkey.

kqueue scales better than select/poll not to mention that it should be faster. I am having a little bit of trouble with this patch. MLDonkey daemon loads and I am able to connect to the daemon through both the web interface and kmldonkey. However, it seems unable to connect to eDonkey servers.

Are there any takers to help me on this one? It should really improve performance under FreeBSD and possibly other *BSD platforms.

A sample port with the current patch included can be found at

http://people.FreeBSD.org/~lioux/mldonkey-kqueue.tgz

It is not meant for general use since MLDonkey will not connect to any servers but it is good enough for someone to have an idea of what I want to do.

If you only want the patch, it can be found at

http://people.FreeBSD.org/~lioux/mldonkey-kqueue-patch.zip

My current hypotheses are:

1) The MLDonkey C stubs used to interface the kqueue code with the ocaml code are not behaving as expected; i.e., MLDonkey is not calling the stubs C at each and every needed place (at every addition, removal and updating of file descriptors which will, in turn, result in similar changes to the kqueue filters).

2) The kqueue code is not correctly written.

I think that most people can help with option (1). :) All and any help is appreciated.

This email can be followed at FreeBSD mailing list:

http://groups-beta.google.com/group/mailing.freebsd.stable/browse_frm/thread/781202b4e66edc61/bc4d45a705ad9ba0?lnk=st&q=freebsd+kqueue+mldonkey&rnum=1&hl=en#bc4d45a705ad9ba0

Mario Sergio Fujikawa Ferreira <lioux>

 

(-)Attached Files

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #9217:  patch-src::utils::lib::stubs_c.c added by lioux (10KiB - text/x-csrc - kevent/kqueue patch)

 

(-)Dependencies

Depends on the following items: None found

Items that depend on this one: None found

 

(+)Mail Notification Carbon-Copy List

(+)Votes

(+)History

Back to the top

Powered by Savane 3.14-e31b.
Corresponding source code