HC1 at bootup mysterious load/slowness

Post Reply
fvolk
Posts: 300
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1, H2
Has thanked: 0
Been thanked: 11 times
Contact:

HC1 at bootup mysterious load/slowness

Unread post by fvolk » Thu Jun 06, 2019 3:26 am

I have been running a HC1 for some time now:
* Ubuntu minimal image from Odroid, upgraded to 4.14.120-160.
* microSD card
* harddisk

After the HC1 has not been used for some time,
I turn HC1 on, try to login, and login... is... very... slow... and... all... commands... take... very... long...
After a short time everything is fine and fast again.
Shutdown and start again does not trigger this again, it appears to happen only after some time off.
This was not so from the initial installation, this "problem" only started "some time ago".

Today I made a crucial observation, see attached screenshot.
Something tries to really really write to the disk - which would explain the slowness.
At this point in time only the microSD card is mounted, but not the harddisk (it is encrypted, so I have to do that manually).
The screenshot was done a little bit too late, but 3 seconds earlier you do no see any process taking up CPU, but the CPU bars show half bars of red - and AFAIK red belongs to the system/kernel and not to some specific process - which would match the observed heavy disk writes.

I'll try to trigger it again and screenshot earlier, but we probably have to wait some time for that.

...what is happening here? Anybody seen something similar?
Attachments
hc2.png
hc2.png (116.24 KiB) Viewed 401 times

User avatar
odroid
Site Admin
Posts: 32570
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 190 times
Been thanked: 355 times
Contact:

Re: HC1 at bootup mysterious load/slowness

Unread post by odroid » Thu Jun 06, 2019 8:41 pm

Change the CPU governor to "performance" mode.
https://wiki.odroid.com/odroid-xu4/appl ... q_govornor

fvolk
Posts: 300
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1, H2
Has thanked: 0
Been thanked: 11 times
Contact:

Re: HC1 at bootup mysterious load/slowness

Unread post by fvolk » Wed Jun 12, 2019 3:58 am

I think I found the cause:
Jun 11 20:51:24 hc1 fstrim[1074]: /: 25.6 GiB (27484901376 bytes) trimmed
This is a 32GB microSD card, and apparently Ubuntu tries to run a full trim on it from time to time.
I don't think it did that in the beginning.
I don't think TRIM makes sense with microSD cards? (only real SSDs)

...so the solution is to just delete that periodic auto-trim, Ubuntu's default is not good.

User avatar
odroid
Site Admin
Posts: 32570
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 190 times
Been thanked: 355 times
Contact:

Re: HC1 at bootup mysterious load/slowness

Unread post by odroid » Wed Jun 12, 2019 10:02 am

I believe Trimming should be good to keep the continuous writing performance on any NAND-flash based storage.
But I also have a doubt in Ubuntu server rootfs needs periodic frequent trimming.

fvolk
Posts: 300
Joined: Sun Jun 05, 2016 11:04 pm
languages_spoken: english
ODROIDs: C2, HC1, H2
Has thanked: 0
Been thanked: 11 times
Contact:

Re: HC1 at bootup mysterious load/slowness

Unread post by fvolk » Mon Jul 01, 2019 4:15 am

yep, it's fstrim that seems to be triggered ~once per week a few seconds after bootup.
CPU load is not much, but you can't do anything while it runs...
hcxx5.png
hcxx5.png (61.02 KiB) Viewed 227 times

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 8 guests