using my USB stick 3.1 sandisk ultra dual deluxe 128GB reversibile Type-C and Type-A connectors 150Mb/s reed speed exfat formatted (and also a similar USB stick NTFS formatted) inserted in USB-C socket (and also in 3.1 USB-A socket)
the test has been made with both the USB sticks and both was writeable and readeable before and after
I tried to copy 6 files (from 2 to 0.8 GiB) and the copy was very fast, I safely removed and I waited about 20minutes with the rolling icon and the operation wasn’t finished, I switched off the laptop and estracted the USB stick, nothing was copyed.
the only way to copy in a reasonable time was to copy one file at time and safely remove the stick, then reinsert the stick and copy another file.
is it possible to have a real copy progress bar instead of the very fast but fake that the event notification widget show me?
I don’t think the progress bar is showing fake values; it’s just that flash media like USB sticks or SD cards have a very fickle and sometimes unpredictable behavior.
The underlying write() system calls end up in a kernel buffer first, and from then on it’s up to the kernel and its I/O strategies when to actually write the content of that buffer to the target device. And some types of target devices have their own buffers again; in particular flash media tend to have one.
That leads to the impression that the copy operation was very fast, but in reality the kernel responds with a success code when writing to the kernel buffer is done. And that’s what you see in the progress bar.
Try the same thing in the command line with a plain cp command - you will see the same result. But you will also see the LED of the USB stick still flickering when the cp command already returned. When you send a sync command after that, the kernel buffer is explicitly flushed, i.e. data are written to the stick; that may take a while after a large copy operation.
And as a USB stick fills up, it typically takes longer and longer because the stick will also take care of some wear levelling, i.e. not reuse the same few blocks again and again, but distributing the writing over previously unused (or less used) disk blocks.
The progress bar is not lying to you. The kernel is kind of cheating, and the USB stick is cheating even more. That’s fine if you are only copying small amounts of data, but when you are filling up half the stick, it will really show. But don’t worry; that’s normal.
And BTW this is also the reason why you need to unmount and eject removable devices such as USB sticks or SD cards; otherwise the buffers may not end up on the actual device.
Maybe I missed it, but I don’t read where you specified “what” you used to copy the files… Dolphin? Konqueror? Midnight Commander?
“cp”? “rsync”?
Something else?
ok, but in this way is not possible to know how much it takes to the end of copy and when to extract the stick, is there any way to get this information?
and why copying one file per time and safely remove takes so much less time instead of copying all files together?
is there a way to have at least a comparable time?
When the unmount and eject are finished and the LED of the USB stick (if it has one) indicates that it’s no longer busy, you can unplug tit: All data are written to it. Some desktops may hide this behind a menu item like “safe removal”. Others explicitly name it “unmount” and “eject”.
There is no way to predict the time; it totally depends on the hardware.
(to @shundhammer … I can predict the time remaining on my system, via Dolphin feedback )
.
Okay, to @pier_andreit , for your feedback:
My opinion … something amiss on your system.
I just tested by copying six 1.2gb files to a Sandisk Cruiser Glide 8gb USB stick (USB-A only).
I used Dolphin on this Leap 15.6 (up to date) laptop (running on battery).
My Sandisk I tested with is WAY SLOWER than yours. It took about five minutes to copy the six 1.2gb files.
The “progress bar” was highly accurate during the complete copy process.
(see screenshot where the last file is still being copied and shows about 12 seconds left to copy, “98%”).
In Dolphin, after the copy finished, I tapped “Safely Remove” for the USB stick … I removed it, then after 4-6 seconds inserted it again, selected “mount it” … and all six 1.2 gb files are there in their entirety.
I do have a Samsung USB stick like yours, but too lazy to go find it … there’s no doubt the copy would happen in 2-3 minutes.
Again … something probably amiss on your system.
Well, as I wrote: It totally depends on the hardware (of the USB stick). I’ve seen sticks that were lightning fast for some 100-200 MB, and then write performance totally broke down. A nearly full stick tends to be way slower than a nearly empty one. Some sticks have an additional buffer, some don’t.
Often enough, I observed the copy command (cp or rsync) to return as “finished”, and the stick’s LED kept flickering for 5-10 more minutes. That’s what I call unpredictable.
@pier_andreit I’d suggest opening a terminal and in there run btop, you can see the active command/process performing the copy, likewise should see i/o to the storage medium. Anything like that should run a sync and tell you when the device can safely be removed…
Not sure … I’ve not customized my KDE or Dolphin for the features.
If you refer back to my screenshot - there’s the Taskbar (mine is at top of screen) and we also see the upper-right corner of Dolphin window, displaying the content of the destination USB stick, as the copy is happening.
In the Taskbar, at the extreme left, we see Dolphin’s “progress circle”, almost as a full circle.
In Dolphin’s pop-up progress dialog box, we see:
remaining time (shown as a seconds countdown)
the file copy count currently at (6 of 6)
percentage complete (98%)
a “pause” and “stop” button
We see the last file’s size is currently showing “1.0 GiB”, soon to be shown as “1.2 GiB”, as with the other files. As each file is copied, I see the size continually increase, to reflect copy progress.
So for me, there is just one progress indicator shown in the KDE Toolbar (the circle).
The Dolphin pop-up progress dialog is NOT associated with the KDE Toolbar … it pops up over the top right portion of Dolphin’s main window.
It’s unclear to me why your Dolphin doesn’t show the same progress features. Maybe something in Dolphin’s Settings (?).
You also indicate that it takes a loooong time to copy the files (though not for me, so might be machine hardware).
no, dolphin shows the progress bar, is the “safely remove” that doesn’t show progress bar, maybe it is supposed short (as in the past in yast there wasn’t a progress bar for formatting operation I suppose becouse in the past was very short and now with terabytes disks wasn’t so short so developers added a progress bar) time but in my case it is not short
yes, me too have the same progress bar in dolphin, but when I safely remove no progress bar is shown in removable divices, and the time for safely remove is not so short
Well, that time is for a reason ( buffering ). Copy a 25GB tar.gz to USB, and pull the USB out at the very moment the progress bar stops, but the USB cannot be unmounted yet. Then try to open the tar.gz . Very likely it
will not show at all, or
drive your computer crazy, if you’re lucky with some “file corrupted” message
All this because the data that were still in the buffer were not written to the USB yet.