Linux Mint
Linux Mint is a free Linux-based operating system designed for use on desktop and laptop computers.
Want to see the latest news from the blog? Set the Firefox homepage to:
where is a current or past release. Here's an example using release 21.1 'Vera':
https://linuxmint.com/start/vera/
Do you think you may be using USB sticks with a small SLC cache? If this is the case I would expect the transfer to be fast until the cache fills up then it would slow down to the speed of the rest of the NAND for remainder of the transfer. You wouldn't experience the slow down unless you were transferring files larger than the cache. This could explain why the issue has followed you across so many computers.
More affordable USB sticks may have cache sizes of 1 - 2 GB. I've seen high performance models available with 64GB caches.
If this is the cause of your issue, using a USB stick with a larger cache would be a solution.
I can make bootable sticks in five minutes but if I copy a file of similar size to them is half an hour
This is the bit that interests me. Are you saying if you e.g. restore an ISO image, you can write to the USB a lot faster than when you copy files? If so, that would either point to a filesystem driver issue or an issue with the tool being used to copy files. Or something else interceding such as AV or selinux.
I could try to copy files using the command line and see what happens. Sigh, I'll have to figure out where it mounts the usb for that.
That's easy: from the file manager you can copy the path to it. Or from the terminal:
df -h
Should show you mounted filesystems.
what are you using to copy? what filesystem is the usb stick using?
Right now I'm not at home so I can't check, I drag and drop the files with the default file browser on cinnamon.
This time I formatted the stick in ext4 but it was the same with NTFS.
Both are overkill for removable storage. Try using a filesystem that is engineered for that, such as exfat, unless you have a very special need.
in your shoes, i would switch to a terminal to get hard numbers instead of gut feelings and try different file systems and copy utilities.
I'm using LMDE 7 and I cannot reproduce this.
My setup is a no name USB 3.0 32g usb stick formatted exFAT. I tested using cp to copy a 170k file to the usb stick and it took less than half a second. I ran it with time to make sure. When I ejected the drive it took maybe 1 second more before it was ready to remove.
ETA: I just tested a 1G file and it took 45 seconds to copy and run sync.
That's the most frustrating part, most people can't reproduce the issue while it has been following me across three laptops, two desktops and all the usb sticks I've ever owned on NTFS, ext4 or FAT32.
I guess I'll try exFAT
This. Give exfat a try. It was created specifically for removable storage.
I know exFAT is much more efficient than FAT32. Also, how much ram do you have? If less than 8g that could also be related.
Right now I have 8 but it was the same when I had 16.
This has been my goto fix on a number of problematic machines:
Add these lines to the end of /etc/sysctl.d/99-sysctl.conf
vm.dirty_bytes=50331648
vm.dirty_background_bytes=16777216
what does it do? more caching?
Less, I also have this but with different numbers. The simplified answer is that the transfer speed that you are seeing isn't the actual speed that it is transferring to the disk in the first place. Instead it is the speed of it being cached into ram, before tapering off to actual write speeds. The defaults work on most machine, but there isn't a one size fits all value. You may find that playing around with those numbers causes more stable write speeds because it will force the system to actually write the data to the usb stick instead of letting large amounts of data cache into ram before actually writing it out to disk. This is often the reason why when it says it is done writing it isn't actually done writing and you have to wait some minutes on some systems to be able to eject. In fact, a lot of times on machines that experience this problem. Hitting the safely eject button is what forces it to immediately write all data to disk.
I believe there was an article about it that I can't seem to recall the name of, but I believe it was something along the lines of "your operating system is lying to you" or something like that.
there's a thing that drives me nuts with linux, i really wish it showed actual progress. are you aware of a way?
i once sat for like 30 minutes waiting for the actual write to finish after unmounting. makes me want to disable caching altogether.