Problem Parallel implementation of the library in mono?

Does Mono support a parallel task library? If so, how is performance compared between .NET and mono.

+8
c # mono task-parallel-library
source share
3 answers

This was implemented in version 2.6 of Mono.

From the release notes:

Parallelfx

This release introduces some of the ParallelFx infrastructure components that were developed as part of Google Summer Of Code 2008 and 2009. More precisely, it has a parallel task library and data structures for coordination.

Using ParallelFx, you can easily develop software that can automatically use the parallel potential of today's multi-core machines. To this end, several new designs are now available, such as futures, parallel loops or parallel collections.

To use this code, you need to manually enable the .NET 4 profile using the --with-profile4 = yes switch at the setup stage.

+9
source share

In my own experience, I have a very parallel C # program for learning and classifying data for gene sequences, which makes great use of the functions of the parallel task library, such as Parallel.ForEach, Parallel.For, Task.Factory. StartNew () and many structures from the Collections.Concurrent namespace (blocking collections, parallel dictionaries, parallel packages, etc.). In short, my application performance on Linux using mono is many times slower. I'm still trying to figure it out. I can run it from the mono console in windows with similar performance.

I experimented using the mono sgen garbage collector to no avail. The performance of my application on a mono Linux server is still significantly slower.

Learning 8,258 sequences: 0:17 vs 1:59 m: ss on Linux

Classify sequences 921: 2.29 seconds versus 11:05 mm: ss for Linux

See screenshot below.

enter image description here
enter image description here

+5
source share

Have you tried changing min / maxthreads?

System.Threading.ThreadPool.SetMaxThreads(mWorker, mWorker); System.Threading.ThreadPool.SetMinThreads(10, 10); 

You work far behind me, but I have found that nothing is being done. So I set it to 5 * the number of processor cores, and it clicked right from it!

0
source share

All Articles