Re: [linux-audio-dev] oh well, so much for mlock/mmap

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] oh well, so much for mlock/mmap
From: Erik de Castro Lopo (erikd_AT_zip.com.au)
Date: Wed Apr 05 2000 - 01:37:50 EEST


Paul Barton-Davis wrote:
>
> I wrote two test programs (see below). One of them uses mlock/mmap to
> step through 24 files, locking their data into RAM in 256kB chunks.
> The other uses pread(2) to copy data into an mlocked buffer.
>
> The mmap/mlock version takes 3 times as long as the pread version.

Did you try doing this without the mlock? Without mlock() you will
need to read at least a byte from each page.

What kind of disks are you using? Its my understanding that IDE
don't work all that well. On my fast wide SCSI disks in an experiment
similar to yours, I was able to do the read data from 32 files of
48 Meg each. By mmapping the files in 256k chunks, I was able to
"read" the files at what would have been a rate to 400k samples
per second on 24 bit samples. This is on fast wide SCSI with 2 450MHz
PII processors). The data rate off the disks was about 37Meg/sec
(over 40 sec) which is very close to the limit of the IBM disk I
am using. Using read the data rate dropped to about 10Meg/sec.

Erik

-- 
+-------------------------------------------------+
     Erik de Castro Lopo     erikd_AT_zip.com.au
+-------------------------------------------------+
"The day Microsoft makes something that doesn't suck is probably the 
day they start making vacuum cleaners." -- Ernst Jan Plugge


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Apr 05 2000 - 02:13:30 EEST