bugGNU Core Utilities - Bugs: bug #23023, cp -r use a lot of memory, ...


You are not allowed to post comments on this tracker with your current authentication level.

bug #23023: cp -r use a lot of memory, feature or memory leak?

Submitted by:  Matteo Boccafoli <matteo>
Submitted on:  Tue 22 Apr 2008 08:13:06 PM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Confirmed
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Fri 02 May 2008 07:34:58 AM UTC, comment #2:

See discussion on this thread:

Jim Meyering <meyering>
Project Administrator
Thu 01 May 2008 04:02:22 PM UTC, comment #1:

As suggest from Jim Meyering, I attach valgrind output using
$ ./valgrind --tool=massif /bin/cp -r /dev/shm/1/ /dev/shm/c

$ cp --version
cp (GNU coreutils) 5.97

(file #15577, file #15578, file #15579, file #15580)

Matteo Boccafoli <matteo>
Tue 22 Apr 2008 08:13:06 PM UTC, original submission:

# 21000 dir in 1.tar.bz2
$ cd /dev/shm
/dev/shm$ time tar -xjf 1.tar.bz2

real 0m8.403s
user 0m3.188s
sys 0m5.196s

/dev/shm$ time ./busybox cp -r /dev/shm/1/ /dev/shm/b
real 0m54.421s
user 0m0.832s
sys 0m51.751s
# [time t_1,t_2 : t_1<t_2 and cp.memory(t_1)==cp.memory(t_2)]

/dev/shm$ time /bin/cp -r /dev/shm/1/ /dev/shm/c
real 0m55.696s
user 0m2.680s
sys 0m50.447s
#[time t_1,t_2 : t_1<t_2 and cp.memory(t_1)<cp.memory(t_2)]
# using a lot of memory (max 54 MB of RAM)

Is it a feature or memory leak?

Matteo Boccafoli <matteo>


Attached Files
file #15578:  ms_print.txt.gz added by matteo (46KiB - application/x-gzip)
file #15579:  massif.4613.txt added by matteo (2KiB - text/plain)
file #15580:  massif.4613.ps added by matteo (54KiB - application/postscript)
file #15577:  massif.out.15750.gz added by matteo (27KiB - application/x-gzip)
file #15507:  1.tar.bz2 added by matteo (174KiB - application/bzip2 - 21000 dir)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by meyering (Updated the item)
  • -email is unavailable- added by matteo (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-05-02 meyering StatusNone => Confirmed
    2008-05-02 meyering PrivacyPrivate => Public
    2008-05-01 matteo Attached File- => Added massif.out.15750.gz, #15577
        Attached File- => Added ms_print.txt.gz, #15578
        Attached File- => Added massif.4613.txt, #15579
        Attached File- => Added massif.4613.ps, #15580
    2008-04-22 matteo Attached File- => Added 1.tar.bz2, #15507

    Back to the top

    Powered by Savane 3.4