[Mono-bugs] [Bug 606228] New: Very bad performance of async socket application specifically under Mono/Linux (Notifications: epoll)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat May 15 19:51:48 EDT 2010



           Summary: Very bad performance of async socket application
                    specifically under Mono/Linux (Notifications: epoll)
    Classification: Mono
           Product: Mono: Runtime
           Version: unspecified
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: io-layer
        AssignedTo: lupus at novell.com
        ReportedBy: ickard at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Created an attachment (id=362497)
 --> (http://bugzilla.novell.com/attachment.cgi?id=362497)
The application where I noticed the slowness

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.2
(KHTML, like Gecko) Chrome/5.0.342.9 Safari/533.2

I was playing around with F# async workflows when I noticed a (to me) very
strange performance problem. I was sending messages for 15 seconds between a
small client app and an server app (both using NetworkStream.BeginRead() and
friends). On linux on my Mono 2.4 (ubuntu lucid) setup on my Core 2 duo machine
it only managed to send 180 messages over 15 seconds. So I tried it in my .Net
virtualbox setup where it managed around 6000 messages. So I thought it was a
problem in mono in general. But then I got the idea to run it under
Mono/Windows. There it ran fine (4000 or so requests). I even ran the software
on an old PowerPC mac under Mono/OSX, and it managed more than a 1000 requests
even though it was a really old machine. So I figured it is probably a problem
with the epoll backend in the io-layer, but I might be wrong.

I also tried running the application under Mono trunk but it was the same
performance as earlier (180ish requests). Also on my (much slower) netbook with
linux also, it managed 180ish requests as well.

Worth to notice is that under linux (when the program runs slowly) the apps
also take very low cpu, it's like the threads are simply sleeping or something.

Attached is an archive containing the source code for the library (requires F#
compiler, sorry) and the Client app and server app, both written in C#. (there
is also a build.sh file)

Reproducible: Always

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list