USB instalation bad write/read rates

Hi there!

Some days ago I decided to reinstall my Kodi setup, with some other services (Lidarr, Jackett and Transmission). Everything was working, but for some weird reason seems I corrupted my SD.

So I ordered another cheap SD card and an USB 3.0, thinking that setup would be harder to corrupt and I would get better performance. Since first moment I was feeling everything more slow, so once everything was installed again I tried to benchmark write/read rates based on this thread Usb install vs sdcard - #21 by Zappatron My results:
Write

root@osmc:/home/osmc# dd if=/dev/zero of=test bs=1M count=512 conv=fdatasync
512+0 records in
512+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 71.0382 s, 7.6 MB/s

Read

root@osmc:/home/osmc# free && sync && echo 3 > /proc/sys/vm/drop_caches && free && dd if=test of=/dev/null bs=1M count=512
              total        used        free      shared  buff/cache   available
Mem:         764724      357744       34208        5144      372772      347464
Swap:             0           0           0
              total        used        free      shared  buff/cache   available
Mem:         764724      358300      299624        5144      106800      350924
Swap:             0           0           0
512+0 records in
512+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 21.9898 s, 24.4 MB/s

In comparison with thread results (SD instalation, Raspberry 2), and thinking my instalation is on an USB 3.0 flash drive, I though I am getting a really bad results specially on write (7.6 MB/s to 12.7 MB/s).

Is this OK? Is there a way to move all my installation to and SD in order to give it a try?

My setup
Raspberry 3 (old, so I supposed is A version?)
USB Kingston DataTraveller 16 GB
Kingston SD card
An external HD Seagate (not powered by Raspi, external power)

Thank you in advance

mainly when dealing with usb installations is the powersupply if you got a shitty powersupply it all fails downward

got a rpi3b too getting really good read write speeds but i ditched the standard power supplies for multi-port adapter

dunno why you went with DD when hdparm is installed.

hdparm -Tt /dev/sda
 /dev/sda:
 Timing cached reads:   1412 MB in  2.00 seconds = 705.79 MB/sec
 Timing buffered disk reads:  98 MB in  3.02 seconds =  32.43 MB/sec

Thanks Toast!

dunno why you went with DD when hdparm is installed.

Cause I am not really know what I am doing :smile:

Here my metrics:

/dev/sda:
 Timing cached reads:     8 MB in  2.00 seconds =   4.00 MB/sec
 Timing buffered disk reads:  92 MB in  3.02 seconds =  30.44 MB/sec

Yeah, there is not a typo everything is taken forever…
I returned home right now, and seems Transmission has stopped. Not sure why. If I check status says Main PID: 465 (code=killed, signal=KILL)

Also said I have overclocked my raspi to Turbo (after my first message), just to see if that could help. But I think is going to be worse.

Can not check power adapter right now, but I think is 1 - 1.5 A . What value should be enough?

That’s not enough 5v 3A is highly recommend for RPI3b. I recommend not overclocking until your sure of your setup

This holds some valuable info

I checked it yesterday, and as you suggested its 5v 3A. I power everything off just to see that, remove overclock, and checked again the rates:

root@osmc:/home/osmc# hdparm -Tt /dev/sda

/dev/sda:
 Timing cached reads:   962 MB in  2.00 seconds = 481.27 MB/sec
 Timing buffered disk reads:  72 MB in  3.05 seconds =  23.61 MB/sec

So much better!

Just returned today from work, and again bad rates:

root@osmc:/home/osmc# hdparm -Tt /dev/sda

/dev/sda:
 Timing cached reads:     2 MB in  6.36 seconds = 321.83 kB/sec
 Timing buffered disk reads:   2 MB in  5.78 seconds = 354.22 kB/sec

This is my topat that moment:

I installed iotop trying to see something more but nothing interesting… Again checked read rates and again good ones (without reboot this time).

So I have no clue what is going on here, any ideas? :thinking:

make sure to kill of transmission when your testing since it can be using the drive while testing.

Thank you very much for all your help Toast

Transmission just have one dead torrent and is pointing to my external HD, so I dont see so much relation…

On the other hand, I executed iotop and found this:

that jbd2 proccess its eating 40/50 % IO all the time. Searched for it on google and found some suggestions about set noatime on fstab. Went there and found the following:

/dev/mmcblk0p1  /boot    vfat     defaults,noatime,noauto,x-systemd.automount    0   0
# rootfs is not mounted in fstab as we do it via initramfs. Uncomment for remount (slower boot)
#/dev/sda1  /    ext4      defaults,noatime    0   0

So not sure if uncomment last line, as system is there and I am worried of breaking everything. Also, should I set a line for my external HD? At this moment I need to unplug each time I reboot the system.

Thank you

I think you’ll find that the IO> column is the percentage of time that the process is spending (ie usually waiting) on I/O.

See performance - How does iotop calculate the relative I/O activity? - Unix & Linux Stack Exchange

Seems you got a lot of stuff on your rpi, I tend to split up what a raspberry does if a raspberry is a mediacenter then its purpose is a mediacenter not a general downloader

many seem to crap as much as possible into a rpi thus overloading it.

would recommend setting up all that downloaders on a separate rpi, plus im not a fan of mono since its not native to Linux it tends to be a resource hog and kodi by itself can be quite a hungry beast