Date: Mon, 12 May 1997 11:41:45 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: vadim@tversu.ac.ru (Vadim Kolontsov) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: mmap() Message-ID: <199705121841.LAA07971@phaeton.artisoft.com> In-Reply-To: <19970512115004.56026@tversu.ac.ru> from "Vadim Kolontsov" at May 12, 97 11:50:05 am
next in thread | previous in thread | raw e-mail | index | archive | help
> this question must be old, but anyway... > > why mmap() under freebsd (at least, 2.1) almost two times slower than > read()? I've tryed to read large files, with multiple mmap()'ing file into > buffer with size = getpagesize() * 10, and with/without madvise()... Because of the way buffering is implemented, mmap() can not trigger predictive read-ahead, while read() can. The performance improvement in read() for sequential I/O comes from read-ahead. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705121841.LAA07971>