Getting mmap's to read in faster
Getting mmap's to read in faster
- Subject: Getting mmap's to read in faster
- From: Dave MacLachlan <email@hidden>
- Date: Thu, 03 Nov 2005 14:10:57 -0800
I hope this question is appropriate for this list:
I have a file that I am mmap'ing and jumping around in in sort of a
random walk. But I do manage to hit most of the file. Is there anyway
to encourage the OS to page it in for me, knowing that I'm going to
be using it? The performance I'm getting reading in a couple of
blocks at a time is rather slow, and I see by examining the Darwin
sources that calling madvise with MADV_WILLNEED is currently useless.
I tried doing a mmap and then immediately calling read on the same
file descriptor that I mmap'd to read in all the blocks, but this
locked up various processes on my system.
4327789 Calling mmap then read locks up parts of vmsystem
4327794 madvise doesn't do anything with MADV_WILLNEED
Cheers,
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden