SD card unbearably slow

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

SD card unbearably slow

Postby schmidtbag » Sat Apr 02, 2016 10:43 pm

I've been using an ODROID-U2 as a home server for a couple months. So far it's been working great, but lately there seems to be a serious performance issue with the SD card. It's slowing down to an almost unusable level. I have a feeling this is because TRIM isn't enabled.

I have just tried enabling fstrim.service, and I tired "tune2fs -o discard /dev/mmcblk0p1" (though I'm not sure if that's a permanent change). fsck didn't report any errors, so as far as I'm concerned the SD card is in good shape. I also turned off journaling, which hopefully I won't regret.

Since the SD card isn't listed in /etc/fstab, I can't add the discard flag, and I'm not sure if adding it to fstab will break anything.


I haven't yet noticed any performance difference but I'm not sure if I've tested long enough to notice. Does anybody have any other suggestions, or any thoughts on why it's running so slow? Is TRIM even the problem here? I'd like to point out that CPU usage is very low.
schmidtbag
 
Posts: 25
Joined: Sat Nov 02, 2013 8:44 pm

Re: SD card unbearably slow

Postby moonman » Sun Apr 03, 2016 12:02 am

There is no TRIM command in SD Spec as far as I know. Could be that your SD card is wearing out and dying?
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: SD card unbearably slow

Postby schmidtbag » Sun Apr 03, 2016 12:04 am

Maybe, but if that was the case then wouldn't fsck notice problems? I'm not entirely sure, maybe I'm wrong about that.
schmidtbag
 
Posts: 25
Joined: Sat Nov 02, 2013 8:44 pm

Re: SD card unbearably slow

Postby syg00 » Sun Apr 03, 2016 2:28 am

Easy enough to add an entry for the root to fstab - and add discard. Let the filesystem deal with whether is applicable or not.
syg00
 
Posts: 15
Joined: Sat Mar 12, 2016 1:30 am

Re: SD card unbearably slow

Postby schmidtbag » Sun Apr 03, 2016 2:33 am

Well the weird thing is /dev/mmcblk0p1 (the boot drive) isn't and never was listed in fstab, so I don't know if adding it to that will cause a conflict of some sort. If it's perfectly safe to do then yeah, I'll add it with the discard flag and hopefully things will improve (or at least not get worse).
schmidtbag
 
Posts: 25
Joined: Sat Nov 02, 2013 8:44 pm

Re: SD card unbearably slow

Postby syg00 » Sun Apr 03, 2016 4:32 am

Works on my RPi3 - discard shows up in "mount", don't know if it works or not, completely new system.
syg00
 
Posts: 15
Joined: Sat Mar 12, 2016 1:30 am

Re: SD card unbearably slow

Postby syg00 » Sun Apr 03, 2016 4:45 am

I see constant lights flashing o my USBs, so I built blktrace - thought it might help you too.
Doesn't have the ioctls to talk to USB and/or SDcard, so no luck there.
syg00
 
Posts: 15
Joined: Sat Mar 12, 2016 1:30 am

Re: SD card unbearably slow

Postby moonman » Sun Apr 03, 2016 5:00 am

There is a hardware wear leveler on the sd cards so bad blocks don't show up at the filesystem level. If they do the card is toast. Not sure about TRIM or similar on sd cards, and if linux knows how to use it if there is one i will have to look into that. It might show up because you specifiically told mount to try to use it, doesn't mean it works.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: SD card unbearably slow

Postby syg00 » Sun Apr 03, 2016 8:07 am

Agreed - like I said, I don't know if it works or not. But if e2fsprogs has the support I'm happy to use it.
syg00
 
Posts: 15
Joined: Sat Mar 12, 2016 1:30 am

Re: SD card unbearably slow

Postby schmidtbag » Sun Apr 03, 2016 2:02 pm

So I tried adding mmcblk0p1 to fstab (with the discard flag) and it seems to boot up just fine, which is great. But, according to mtab, discard isn't enabled. I can't say I'm surprised, because uboot or whatever seems to have been able to boot this with a blank fstab, which means it's probably overriding any settings for this SD card. Oh well - for something that doesn't have any definitive proof of helping me, I'm not sure pursuing that is worth it.

I uninstalled a few unnecessary packages and disk performance seems to have improved, for now. Still slow, but at least now I'm not waiting a full minute just for pacman to run.
schmidtbag
 
Posts: 25
Joined: Sat Nov 02, 2013 8:44 pm

Next

Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 8 guests