Re: mmap question

Kurt Garloff (garloff@suse.de)
Sun, 5 Dec 1999 19:41:34 +0100


--0FM4RQAc0jwHekq5
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

On Fri, Dec 03, 1999 at 01:49:56PM -0500, nbecker@fred.net wrote:
> For strictly sequential processing of large amounts of data will I
> generally get better performance using read/write or mmap?

Use read() then. The kernel assumes a more sequential like access pattern
with read() and does more read-ahead, while it assumes a more random like
access pattern with mmap(). This is reasonable, as the primary use of mmap()
is the loading of binaries and libraries.
At least, that was the situation when I checked last.
The difference should not be so large with 2.2 kernels. With 2.0, it was
quite huge.

Regards,
--=20
Kurt Garloff <garloff@suse.de> Eindhoven, NL
PGP2 key: See mail header, key servers Linux kernel development
SuSE GmbH, N=FCrnberg, FRG SCSI, Security

--0FM4RQAc0jwHekq5
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE4SrHexmLh6hyYd04RAYG+AKCSFTfAAqnUSb9N3wI21aYyqipxVgCg0Yjj
8HG4YsPXQmdlLtfjlWYPz/w=
=dvlO
-----END PGP SIGNATURE-----

--0FM4RQAc0jwHekq5--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/