Date: Mon, 29 Oct 2012 07:00:03 GMT From: Ted Mittelstaedt <tedm@mittelstaedt.us> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/87792: [patch] very bad performance of cp(1) via NFS, possibly mmap() problem Message-ID: <201210290700.q9T703Tu083505@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/87792; it has been noted by GNATS.
From: Ted Mittelstaedt <tedm@mittelstaedt.us>
To: bug-followup@FreeBSD.org, Andre.Albsmeier@siemens.com
Cc:
Subject: Re: bin/87792: [patch] very bad performance of cp(1) via NFS, possibly
mmap() problem
Date: Sun, 28 Oct 2012 23:53:01 -0700
Try the following:
In bin/cp/utils.c (source) there is a check, if the file is less than
8MB or so, it uses mmap, if the file is larger, it will use write()
Modify the source and recompiled to -never- use mmap, only to use
write()
Change line 143:
original:
fs->st_size <= 8 * 1048576) {
New:
fs->st_size <= 8 * 8) {
It will use mmap still if the file is larger than 64bytes (if it uses
bytes there, pretty sure it does).
This is from a response to the freebsd-stable mailing list back in
2009 by Brent Jones he reported a 100 fold increase.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210290700.q9T703Tu083505>
