Package: coreutils
Version: 8.23-4
Severity: normal

If you copy many large files to a slow device the amount of memory used for
cache grows needlessly and impacts overall system performance.  As we already
have the --reflink option I think that a precedent has been set for adding cp
options to improve system performance.

Firstly I think there should be an option to call fdatasync() after completely
writing data for a file.  This would reduce the amount of RAM used for write
back caching to a maximum of the size of one file, in the case where you copy
many MP4 files to an SD card that would reduce the amount of write back cache
to something like 300M instead of something large.  dd has a fdatasync option
to do this.

Next I think there should be an option to avoid caching file data which would
be particularly useful when it is known that the size of the files is larger
than the system RAM (IE caching really can't do any good even if you are
accessing the files twice).  The O_DIRECT option seems good for this and it's
an option to dd so it seems that it would work well for cp.

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.1.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages coreutils depends on:
ii  libacl1      2.2.52-2
ii  libattr1     1:2.4.47-2
ii  libc6        2.19-22
ii  libselinux1  2.3-2+b1

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information

Reply via email to