[PLUG] mmap() is indeed lazy

Eric Wilhelm scratchcomputing at gmail.com
Fri Dec 21 18:24:24 UTC 2007


# from Eric Wilhelm
# on Thursday 20 December 2007 17:33:

>I'm guessing that the mmap has to read the entire file before any work
>can start (or -- graciously assuming a lazy/parallel mmap() -- at
> least the rindex() call needs to be looking at the end of the 1GB
> string for the Nth process to get started.)

With some further testing, I've found that Sys::Mmap does indeed seek to 
the offset given to rindex() rather than reading the whole file first.  
So, finding something from the end of a 1GB string which has been 
mmap()ed starts just as quick as seek().

But, distributing the job across multiple nodes is still no fun when you 
can only fill them with a total 1/8 GB/s (the link from the fileserver 
is full.)

Perhaps that explains why Tim's t5120 runs wf.pl faster at 32 jobs than 
8 despite having only 8 cores?  Each core is bored waiting on input for 
a bit unless the incoming data is split more than 8 ways?  (Though I 
suspect that the 8-core 1.4GHz UltraSPARC T2 CPU is a bit different 
than a pile of x86 chips.)

  http://www.tbray.org/ongoing/When/200x/2007/10/30/WF-Results

--Eric
-- 
Speak softly and carry a big carrot.
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------



More information about the PLUG mailing list