On Wed, 31 Aug 2011, Lev Serebryakov wrote:
I'll try this experiment with mmap() and touching every 4096-th byte of
mapped memory instead of read(2).
Strange enough, it gives only 40-50MiB/s and results are very
It really surprise me. I didn't think, that there will be so much
difference, I was sure, that it will be almost equivalent speed.
FreeBSD does not seem to default to sequential read-ahead when memory
mapping is used with sequential page access. Try using madvise()
with the MADV_SEQUENTIAL option and see if it helps.
There are also MADV_WILLNEED, MADV_DONTNEED, and MADV_FREE. Careful
use of these options can help performance quite a lot when data is
large compared to memory.
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
free...@freebsd.org mailing list
To unsubscribe, send any mail to "free...@freebsd.org"