LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Fedora 36, very slow file transfer from SD card (https://www.linuxquestions.org/questions/fedora-35/fedora-36-very-slow-file-transfer-from-sd-card-4175725672/)

terry-duell 06-02-2023 09:58 PM

Fedora 36, very slow file transfer from SD card
 
I regularly transfer image files from an SD card to my system SSD disc, via a USB3 card reader.
Normally, the files transfer at a rate of about 95 MB/s, but just recently the transfer rate is down at about 6.3 MB/s.
My system (Fedora 36) is up to date, and I'm not aware of any recent changes I have made that might have caused this.
Any ideas as where I should look for the cause?
[edit] Sorry, I'm on Fedora 37.
Cheers,
Terry

business_kid 06-03-2023 10:31 AM

There is a cache that the kernel uses to buffer those usb transfers. I need to transfer 10-12G at a time to program up my RazPi. If you use an optimal blocksize, you can get most of the first 2G transferred before it starts to slow drastically. I use
Code:

dd if=/somefile.img of=/dev/whatever bs=1M status=progress
and you can see the rate as you go.

When dd finishes, it syncs the sdcard and prints a final speed rate, which is always to date under 10MB/S. I confess to using cheap sd cards but since sdcards generally last about as long as chewing gum, what's the point of spending money?

jailbait 06-03-2023 12:03 PM

95 MB/s is in the speed range of USB 3.0 reads. The write speed of a SSD is somewhere between 5 and 10 times the USB 3.0 read speed. Since the SSD is so much faster than the USB 3.0 you are not accumulating buffers in the cache. The cache only fills up when the write device is slower than the read device. So the problem is either that the SSD write speed or the SD card read speed has dropped to 6.3 MB/s. You did not complain that you have a degradation of speed for your entire system so I would start by checking out the speed of the SD card.

I suggest that you make sure that nothing else such as internet or a copy is running and try a few tests on the SD card.

You could swap for a known good SD card and try that.

You could copy the SD card to /dev/null and see what speed you get.


On second thought the cache would fill up if the SSD write speed dropped below the USB 3.0 read speed of 95 MB/s.

terry-duell 06-03-2023 06:10 PM

Thanks to all who have posted. A look at the system monitor indicates that clamscan is active and chews up resources. I'll run a test shortly with clamscan off and see if I get my normal result.

Cheers,
Terry

terry-duell 06-03-2023 06:13 PM

Quote:

Originally Posted by business_kid (Post 6434493)
I confess to using cheap sd cards but since sdcards generally last about as long as chewing gum, what's the point of spending money?

Interesting.
I purchase premium fast SD cards, and over many years of constant activity, I have never had one fail.

Cheers,
Terry

business_kid 06-04-2023 05:02 AM

Quote:

Originally Posted by terry-duell (Post 6434542)
Interesting.
I purchase premium fast SD cards, and over many years of constant activity, I have never had one fail.

Cheers,
Terry

Not one? Which sdcards? Try a big image (e.g. 10G) and post the final rate from dd. The slarm64 ones are a good size, although you need zstd to unarchive them.

The devs from various Arm SBC distros use decent high-spec sdcards and talk about a lifespan of ≅6 months. They all have a low write count, so if they're not dying, you're not using them much. The sd cards are also marked with a speed classification, and you can get details online.

terry-duell 06-04-2023 07:55 PM

Quote:

Originally Posted by business_kid (Post 6434580)
Not one? Which sdcards?

No, many...each of my cameras has 2 cards. I have been using Sandisk Extreme Plus 32 GB and 64 GB cards.

Cheers,
Terry

business_kid 06-05-2023 04:04 AM

Ah. Camera sdcards are a bigger size. There's a lot of profit taking on camera sd cards, so price isn't necessarily a guide. I use mainly sandisk & kingston micro sdcards which I referred to as chesap sdcards.


All times are GMT -5. The time now is 06:02 AM.