[Mono-list] Fwd: Threading and IO problem

Jonathan Gagnon jonathan.gagnon at croesus.com
Fri Mar 7 08:26:32 EST 2008


Hi,

My guess is that your threads are waiting for the data to load from the
system memory to the processor cache.  If you do the same test with a small
file (one that would fit in the CPU cache), and read the file multiple
times, I'm pretty sure that the CPU usage would go up.

Jonathan

-----Message d'origine-----
De : mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] De la part de Yanko Hernández
Álvarez
Envoyé : Friday, March 07, 2008 7:34 AM
À : mono-list at lists.ximian.com
Objet : [Mono-list] Fwd: Threading and IO problem

I sent this yesterday with the wrong sender address. Sorry

> >  It is a Dell PowerEdge 2900 (2 xeon 5050, dual core, each core 
> > hyperthreaded)
 >  That's only 4 real execution units.  You're getting the extra smidgeon
>  of performance that HT gives in the best case, but there just aren't 8  >
cores there.  Getting real quad core chips (Harpertown) will likely  >  mean
you can get to full 8 core usage.

 Yes, I know I won't get the same processing power of 8 real  processors.
Nevertheless the OS should occupy the 8 logical processors  to the full
extent with no idle time. That isn't happening when I run  this program. But
it does happen when I do some other stuff, e.g. when  I'm compiling the
kernel with "make -j8 ...". The problem seems to be  that the threads (for a
reason I don't know yet) block for little  periods of time. There are no
other runnable process interfering here,  because there is idle time left.

 There is no IOWAIT either, so the HDs are not the bottleneck (3 disks
 raid5 10Krpm). The file is cached on memory completely so there is no  HD
access (visually confirmed -the HDD LEDs almost doesn't blink  during the
program run-, besides the stats posted earlier showed it  too).

 Besides, the example I posted is not equivalent of the original  program
I'm developing. That program uses a shared object that feeds  the threads
10k lines at a time. With that scheme, the processor usage  was around
75-80%. This is another reason that makes me think the GC  is involved.

 Tomorrow (It's almost 5pm here in Cuba) I will try a different  approach
(instead of using threads, I will use processes to isolate  the GC effect to
one thread)


 >  If you turn off HT in the BIOS (if such a thing is possible on a Dell)

 it is.

 see ya tomorrow. and thanks to all ;-)
_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list



More information about the Mono-list mailing list