0

I recently bought a Raspberry Pi 3 model B (the last release of the Raspberry foundation), and after reading a lot of articles on the Web for SD card vs USB performances, I decided to move all the Raspbian system to my USB stick (most of articles said that USB is generally faster, more reliable, and in my case it has the double of disk space).

So I moved the system to the USB stick by following this guide https://forum.nextinpact.com/topic/168514-installer-raspbian-raspberry-sur-clef-usb/. The main command used to move the partition is rsync, as described in the guide.

At the end, all processes were successful and when I booted for the last time, I saw that the system was successfully moved to USB by checking it with the df -h command.

BUT... after using it for several days, installed many packages, an Apache webserver linked to a MySQL server, my system is now very slow... Most of the time I use SSH to connect to the RasPi or sometimes a network SFTP connection from a Linux (Ubuntu Xenial) computer, and all tasks I launched that are relative to the Raspberry induce a big latency (the latency can be from 10 to 30 seconds long):

  • while connected in SSH, almost all commands are long to execute (even a simple ls command)
  • while connected by a network drive and webserver's files open in Sublime Text instance, this problem causes a Sublime Text freeze every 5 seconds or at every save action

I also checked the disk transfer speed with the command hdparm, and the USB transfer speed is more than 20 MB/s, which clearly cannot cause this extreme latency.

So I searched on the Web, I found some topics where guys had similar problems. I tried their solutions but nothing notable. Maybe I won 2 or 3 seconds of latency, but it still almost unusable...

I think I give you all elements of my problem, and I hope someone can really help me because I really don't understand why this is so slow (and, believe me, I am a professional developer, and I'm used to search everywhere on the Web for a working solution, before posting on a forum).

Thank you in advance.

1

1 Answer 1

0

Why not upgrade the SD card instead of moving everything to a flash drive?

By using the USB drive, you're adding another point of failure, not to mention it's way more complicated than just writing Raspbian to an SD card.

Second, a better SD card can be equal or better* than a USB drive.

Moving the OS from SD to a USB drive has more risks than rewards. That's all I can say, since your question failed to include diagnostic info (e.g. logs). If you need more storage, attach an external hard drive and use it alongside the SD card.

Use the SD card.

*Overclocked SD slot + UHS card. 40MB/s maximum read speed

2
  • Because, like I said, it appears than SD cards are not designed to be written often, they are most used to store data that will not be often changed or re-written, apparently. Otherwise and finally, I made an rpi-update that I didn't made at all since I have the RPi (~ 2 months) which significantly increased performances. It's now usable, maybe less than with the SD card but usable (I think I will still buy a better and more spaced SD card). Thanks for your feedback. Jan 26, 2017 at 20:48
  • @PaulGuzda-Rivière "Write specifications" are overrated. I'm sure an SD card will last just as long, or longer, than a flash drive. I have a log + SQL database server (write-heavy) that's been using the same SD card for 3 years straight and it's still fine. Negligible performance difference than my new SD cards.
    – Aloha
    Jan 27, 2017 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.