Oops. I sent this directly to Jim. It answers most of your questions.
/Ole -- If some genie offered you three wishes, would not your first one be, "Tell me, please, what is it that I want the most!" -- Marvin Minsky in freenet://[EMAIL PROTECTED]/truenames// ---------- Forwarded message ---------- Date: Mon, 10 Mar 2003 13:45:41 +0100 (CET) From: Ole Tange <[EMAIL PROTECTED]> To: Jim Meyering <[EMAIL PROTECTED]> Subject: Re: Memory consumption with cp -l On Mon, 10 Mar 2003, Jim Meyering wrote: > > Is there any other thing that can influence on the RAM usage? E.g. version > > of glibc, version of kernel, version of filesystem? > > Yes. > Please tell me which ones you're using. > Also, please include the version of gcc (assuming that's what > you used) and a copy of the config.h file that was created > in your 4.5.9 build directory. Computer 1: libc-2.2.4.so Linux tigger.tange.dk 2.4.18 #10 SMP i686 ReiserFS version 3.6.25 $ gcc --version 3.0.1 $ cp --version cp (fileutils) 4.1 $ cp-4.5.9 --version cp (coreutils) 4.5.9 Computer 2: libc-2.3.1.so Linux medi.tange.dk 2.4.20-wolk4.0s-pre9 i686 P4 CPU 2.00GHz GNU/Linux ReiserFS version 3.6.? $ gcc --version gcc (GCC) 3.2.1 20021207 (Gentoo Linux 3.2.1-20021207) $ cp --version cp (fileutils) 4.1.11 $ cp-4.5.9 --version cp (coreutils) 4.5.9 I just retried with 'cp -a' and it seems I was mistaking: 'cp -a' does not stay below 1 MB but eats approximately the same amount of RAM. This goes for both version 4.1 and 4.5.9. Actually I had a hard time reproducing the bug on Computer 2: When I copied part of the original material the mem usage got large quickly. But when I copied the copy the mem usage was fairly low. This got me thinking: What is unique about the original? And there _is_ something unique: More than 99% of the files have > 10 hardlinks. It seems _this_ is the cause. You can reproduce the error by doing the following: wget http://home.tange.dk/~tange/cp-bug/test-set.tgz tar xfz test-set.tgz cp-4.1 -Rl test-set t2 # Memusage: 18 MB for cp-4.1 cp-4.5.9 -Rl test-set t3 # Memusage: 5.9 MB for cp-4.5.9 /Ole -- If some genie offered you three wishes, would not your first one be, "Tell me, please, what is it that I want the most!" -- Marvin Minsky in freenet://[EMAIL PROTECTED]/truenames// _______________________________________________ Bug-fileutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-fileutils