Login  Register

Re: Issue with progress bar and locking files when saving

Posted by Fred Damen on Sep 22, 2020; 11:37pm
URL: http://imagej.273.s1.nabble.com/Issue-with-progress-bar-and-locking-files-when-saving-tp5023969p5023970.html

Greetings Stein,

Most likely your USB disk is configured for performance. In this case, the
write to disk requests are cached by the OS and the throughput appears
better than if really is.  Most likely the close file request waits until
the cache has made it to disk.  This is configurable in the low level
system IO calls.  For USB drives you can configure for safe physical
removal, and the write requests will wait until the cache has made it to
disk; this will appear to work the way that you think it should.

Most drives are configured for performance, and thus why you should not
dop a hard shut off of you computer. The "remove device" icon on windows
and the /bin/sync command are there for insuring all the cache is flushed
to the physical disk.

Fred

https://www.howtogeek.com/410353/how-to-optimize-usb-storage-for-better-performance-on-windows-10/


On Tue, September 22, 2020 10:17 am, Stein Rørvik wrote:

> Hello,
>
> I see an issue with the progress bar when saving large files on external
> drives, and wonder if anyone else experience the same:
>
> When saving a large TIFF file, say 5GB, onto an external drive, the ImageJ
> progress bar runs to completion suspiciously fast (about 3 seconds).
> When it is "finished", the file-size is shown in the Windows as having its
> full size, but the file cannot be renamed or moved from there.
> Also, there is no slice scroll bar at the bottom of the image in ImageJ,
> indicating that the file is still locked by ImageJ.
>
> When the expected number of seconds for a complete save has elapsed (about
> the same number of seconds or minutes it usually takes to copy the file to
> or from the disk in question) the file is unlocked both in ImageJ and
> Windows explorer and can be moved and/or reopened showing its normal
> contents. So the file locking works as it should; it is the progress bar
> that is wrong.
>
> I see this only happen when using external hard-drives; that is, directly
> connected to the PC via USB.
> On internal disks this does not happen. Neither when saving to networked
> disks. The progress bar elapses correctly here.
>
> So there seems to be a miscommunication between the OS and ImageJ when
> saving files to removable disks, giving the wrong progress bar speed.
> This is a bit annoying when saving very large files (several tens of GB)
> as you have no indication to how long the file saving will actually need
> to complete.
>
> I am using Windows 10/64, but the problem also occurs in Windows 7/64 and
> using older versions of ImageJ, and Fiji as well.
>
> Stein
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html