[Mono-bugs] [Bug 650439] New: poor performance (and wrong arithmetic result) of multi-thread code

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Nov 1 06:21:13 EDT 2010



           Summary: poor performance (and wrong arithmetic result) of
                    multi-thread code
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.8.x
          Platform: i686
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: matteo.tesser at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Description of Problem:

Three instances of a computing intensive sample performing the calculation of
an integral using a recursive algorithm are launched in a dual core machine.

The sample do the following: at the beginning, the first instance is launched,
then the other  two istances are launched at the same  time using two
differents threads. Given that the test uses only local variables and hence
there is no significant memory allocation on the heap, it is expected that the
two parallel instances to take more or less the same time of the first

Steps to reproduce the problem:
1. compile the attached sample with gmcs
2. launch it

Actual Results:
on a macbook (dual core) with mono 2.8 and mac osx 10.6

Launching one test instance
Integral=76519.7602677242 running time=00:00:03.0577680
Launching two tests instances
Integral=76519.7602677264 running time=00:00:11.9237780
Integral=76519.7602677264 running time=00:00:12.0516960 

Expected Results:

On Windows: dual core machine
Integral=76519.7602677242 running time=00:00:02.0591178
Launching two tests instances
Integral=76519.7602677242 running time=00:00:02.0641180
Integral=76519.7602677242 running time=00:00:02.1941255

On Linux (OpenSuse 11.3 64 bit + mono 2.6.7)

Launching one test instance
Integral=76519,7602677242 running time=00:00:01.5732770
Launching two tests instances
Integral=76519,7602677242 running time=00:00:01.5600490
Integral=76519,7602677242 running time=00:00:01.5657280

How often does this happen? 

Additional Information:

Note that in windows and linux the result of the integral as printed by the two
concurrent threads is equal up to the last digit, while in osx there is also

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

More information about the mono-bugs mailing list