Konubinix' opinionated web of thoughts

Raspberry Pi 3 B Insanely Slow on Basically All Tasks

Fleeting

SD cards are now so commonplace sometimes conceals the fact that not all SD cards are created equal. SD cards have a speed rating – how fast you can read or write data to the card

https://www.raspberrypi.com/news/sd-card-speed-test/

write performance of SD cards declines over time

https://www.raspberrypi.com/news/sd-card-speed-test/

It’s possible - even likely perhaps - that your SD card is nearing end-of-life.

There are several things you should do:

Make a backup asap. A step-by-step was posted here in a recent answer.

If your system is “jammed up”, and you’re unable to run the image-backup utility, it will be quicker/easier to remove the SD card, and “duplicate” it. You’ll need to shutdown your RPi, remove the SD card, and use another system for this. There are numerous “how-tos” posted online for Linux, Mac and Windows hosts… if you want a specific recommendation, let us know what OS you want to use. For Linux/Debian, dd is a reasonable approach.

You can run fsck on your SD card to check & repair any issues with the file system. Another step-by-step procedure was posted recently.

You can run a “speed test” on your SD card: A package called agnostics is available through RPi’s apt repository:

$ sudo apt-get update … $ sudo apt-get upgrade … $ sudo apt-get install agnostics …

https://raspberrypi.stackexchange.com/questions/120497/raspberry-pi-3-b-insanely-slow-on-basically-all-tasks

start with a high quality SD card. Read/write speed has a pretty big impact

https://www.reddit.com/r/raspberry_pi/comments/qiym25/raspberry_pi_is_very_very_slowhelp/

Try it with an “A1” performance rated micro SD card, like the SanDisk Ultra A1 series. It should be much faster than a typical USB flash drive

https://forums.raspberrypi.com/viewtopic.php?t=242802

test sd card/disk speed

see also f3 - Fight Flash Fraud

  • Write speed

sync; dd if=/dev/zero of=~/test.tmp bs=500K count=1024

  • Read speed

sync; echo 3 | sudo tee /proc/sys/vm/drop_caches sync; time dd if=~/test.tmp of=/dev/null bs=500K count=1024

  • Delete the temporary file

rm ~/test.tmp

https://elinux.org/RPi_SD_cards#SD_card_performance

therefore, in the host

device=sdb
for i in {1..10}
do
    if mount | grep -q /dev/${device}$i
    then
        udiskie-umount /dev/${device}$i
    fi
done

echo "## Time to write"
sync; time sudo dd if=/dev/zero of=/dev/${device} bs=500K count=1024
sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
echo "## Time to read"
sync; time dd if=/dev/${device} of=/dev/null bs=500K count=1024