Moving files to USB takes a very long time

Hello.

I’ve installed a fresh copy of Fedora 35 on a new PC build.

The machine is all SSD, USB3, etc.

I have this USB thumb drive that is empty and connected to a USB 3 port. I can copy files to it just fine.

However, when copying a folder from my main hard drive to the USB drive, it takes a VERY long time.

The folder has 146 files with several sub-folders. But not much. Entire folder is around 86 MiB in size. The USB drive is around 2 GiB.

When I drag the folder over (using GNOME 40), the folder appears to instantly copy but it doesn’t. Drilling into the destination folder shows it’s mostly empty. If I wait and wait, I will see files slowly show up.

Is there something I can do to fix this?

Thanks.

You are limited by 2 things.
Data transfer rates via USB. Is the thumb device USB3 or USB2?
Data write rates within the USB device itself.

All that is also affected by the number and size of the files being transferred. Many small files often take longer than a single large file of the same size.

what is the filesystem the USB drive is formatted with?

Well, at first it was FAT32 but for some reason, I couldn’t write to it. Only sudo could. And I didn’t know how to “take ownership”.

Then I re-formatted to Ext4 (version 1.0) and it seems normal now. But only usable with Linux.
It’s strange…for the longest time it took a very long time to copy data. Now, it seems somewhat OK on speed.

So I’m sure I’m doing something wrong.

Welcome to the :fedora: community
To take the ownership it is easy
Mount usb first then replace user with your user name and mount of the given mount point you can do that in gui with gnome disk(disks) open that select your usb and tap settings icon and tap ownership give password and you have.

sudo chown user:user /mnt/my/drive

Now if you are seeing that slow transfer
Sometimes very small individual files copy makes copy slow than a larger single file. Now if your drive is usb 2.0 putting in into a usb3 will not give your 3.1 level of speed.
Format your usb with fat or exfat with gnome disk app and it shoud be ok no issues there
If you want you can benchmark your usb to know about.
With gnome disk(disks) tap your usb partition and select settings icon left side of that app and at the bottom most find a option to benchmark and do that it will show you the result.

1 Like

Thanks for your help.

Odd thing is that taking ownership in disks didn’t actually work. But issuing chown at the terminal worked.

I’ll keep an eye on the performance.

Thanks for your help!

I have never used that gui of ownership but i have seen that so i have suggested as for most gui way is easier but not sure whether it works or not so i have given you the commend line way also but as you have mentioned it does not work i will see it myself by making a similar situation. :smiley:

I have this issue with usb and sd cards. Speeds even decrease and stay at 25kb/s. There is some stuff online that suggests it is a long standing kernel bug. I found if I copy 60,000 small files, it is way slower than if I copy 6 batches of 10,000 small files, so I believe the speed issue is proportional to the number of files being copied. Size also appears to be an issue because 1000 larger files take significantly longer than 10,000 smaller files, and batches of 100 large files take about as long as 10,000 smaller files.

I realize this is kind of vague; I have not really taken accurate measurements regarding this.

What is the total file size combined weight of 60000 files and individual file size
And i need some more info about the drive quality and drive file partition of your usb and the ssd also

As far as i know small files copy takes more time not because of the system but it is due to the computer it self and the memory controler also takes time.
Like it have to journal all files info with location in a index. If you want to check try zip that file and just copy over you will see that you will get the full speed of that drive.

I have done some rough rounding above.

The actual total is 49,436 items, totalling 244.9 MB. Copying all of this was going to take hours.

And the batch copy was 8,082 items, totalling 76.0 MB, 8,081 items, totalling 72.6 MB, 13,825 items, totalling 9.1 MB, 13,825 items, totalling 9.1 MB, 2,068 items, totalling 29.0 MB, 3,555 items, totalling 49.1 MB. Copying these separately, yet concurrently took minutes.

Both of these were from the same SSD to the same usb stick.

totalling: spelling error in Files.

Regarding the large files

4,127 items, totalling 43.1 GB took more than 8 hours

Another non-concurrent batch copy of 73 items, totalling 725.5 MB, 163 items, totalling 1.4 GB, 1,332 items, totalling 13.0 GB, 721 items, totalling 8.9 GB, 507 items, totalling 7.1 GB, 27 items, totalling 476.6 MB, 17 items, totalling 456.7 MB, 15 items, totalling 409.1 MB, and 1,272 items, totalling 10.6 GB took under an hour.

But actually, that was hard drive to sd card vs usb to hard drive respectively. I stopped the single copy operation containing all from usb to hard drive because it was estimating too long and I remembered the trick using the small files.

I never tried so much copy but what you are saying may be that could be the case but need to be verified. I understand that issue if it is a bug or something else. And i find you have a same topic created previously so staying on that makes more sense.