After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 579085 - Progress bar is not moving at a steady pace
Progress bar is not moving at a steady pace
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: File and Folder Operations
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 591546 640787 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-04-15 20:24 UTC by David Zeuthen (not reading bugmail)
Modified: 2021-06-18 15:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Zeuthen (not reading bugmail) 2009-04-15 20:24:08 UTC
When copying a large file to a USB disk (which is kinda slow) from my SSD (very fast), then the progress bar very quickly (in less than half a second) jumps to 200-250MB-ish. This happens because the kernel completes the write operations from user space and keeps the data on the way to the platters on disk in a cache.

Also, if the 'flush' FAT option is used on the target filesystem then, AFAICT, the file operations window is kept up until the cache is flushed. I believe this happens because close(2) blocks until all data has hit the platters.

So the user experience is really poor

 1. Start copying file

 2. Progress window pops up, progress bar is half full

 3. Progress bar is full

 4. Wait until data has hit the platters (many seconds)

 5. Done

Instead, it would be good to move the progress bar at a steady pace.

Here's an interesting write-up

 http://blogs.technet.com/markrussinovich/archive/2008/02/04/2826167.aspx

In particular this bit "That causes the data to fill up memory, possibly forcing other useful code and data out" is interesting and I think we suffer from a similar problem. E.g. that the kernel may evict some useful pages in order to cache pages involved in the copy operation. Ideally we don't want any cache involved at all as

 - it's not going to help us anywhere in a copy operation; it's only
   going to consume resources

 - it may lead the user to believe that the device is safe to remove
   (unless the 'flush' mount option is used.. but this is only available
    for vfat)

Not sure this is easy to fix but I thought I'd file a bug anyway ;-)
Comment 1 Kay Sievers 2009-04-15 20:36:58 UTC
The amount of cache a specific device can occupy from system RAM can be controlled at a per-device base with:
  /sys/class/bdi/<maj>:<min>/*

It looks like this:
  $ grep . /sys/class/bdi/259:393216/*
  /sys/class/bdi/259:393216/max_ratio:100
  /sys/class/bdi/259:393216/min_ratio:0
  /sys/class/bdi/259:393216/read_ahead_kb:128

It allows limiting a particular device to use not more than the
given percentage of the write-back cache.

Maybe that's useful to tweak for device which are hotplugged?
Comment 2 Cosimo Cecchi 2010-12-18 01:44:23 UTC
*** Bug 591546 has been marked as a duplicate of this bug. ***
Comment 3 Cosimo Cecchi 2011-10-20 19:31:09 UTC
*** Bug 640787 has been marked as a duplicate of this bug. ***
Comment 4 André Klapper 2021-06-18 15:18:15 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of Files (nautilus), then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/nautilus/-/issues/

Thank you for your understanding and your help.