XU4 ubuntu 16.04 server is running very slow

Moderators: mdrjr, odroid

XU4 ubuntu 16.04 server is running very slow

Unread postby ehamdja » Fri Sep 14, 2018 6:16 pm

I have been running my XU4 eMMC with Ubuntu 16.04 LTS server for about 2 years but recently my server become so slow. I am trying to figure out what's going on but have no clue whatsoever. I tested my internet connection and ping and it doesn't show that I have slow connection. I am using Webmin to manage my server and based on the report on memory and cpu, it never shows anything above 30% load. What I saw from dmesg some lines shows usb 4-1 and usb 6-1: Parent hub missing LPM exit latency info. Power management will be impacted. Anybody can help me? Btw, I'm still very new to linux and mostly my setup was from internet guide. Thank you in advance
ehamdja
 
Posts: 10
Joined: Wed Nov 16, 2016 8:41 am
languages_spoken: english
ODROIDs: XU4

Re: XU4 ubuntu 16.04 server is running very slow

Unread postby mad_ady » Fri Sep 14, 2018 9:18 pm

It could be slowing down because of storage aging. Are you using emmc or sd? If you're using emmc can you run fstrim -v /? If you're using sd, can you transfer your image to a new card?

You can also install and run iotop and see if there is a lot of I/O going on.
User avatar
mad_ady
 
Posts: 4466
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: XU4 ubuntu 16.04 server is running very slow

Unread postby ehamdja » Mon Sep 17, 2018 2:44 pm

I am running on eMMC. I run
Code: Select all
fstrim -v /
and here is the result
/: 302.6 MiB (317313024 bytes) trimmed

I did run
Code: Select all
sudo iotop
with the following result

Total DISK READ : 0.00 B/s | Total DISK WRITE : 7.58 K/s
Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 0.00 B/s
TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND
1322 be/4 root 0.00 B/s 7.58 K/s 0.00 % 0.00 % perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf
1 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % init
2 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthreadd]
3 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/0]
1028 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % apache2 -k start
5 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/0:0H]
7 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/0]
8 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_preempt]
9 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_bh]
10 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_sched]
11 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [watchdog/0]
12 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [watchdog/1]
13 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/1]
14 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/1]
ehamdja
 
Posts: 10
Joined: Wed Nov 16, 2016 8:41 am
languages_spoken: english
ODROIDs: XU4

Re: XU4 ubuntu 16.04 server is running very slow

Unread postby mad_ady » Mon Sep 17, 2018 3:12 pm

Ok, there's nothing hogging your IO (at the time you ran the command at least). Try running it when you notice performance drops and combine it with top and also check cpu governor/frequency (e.g. with https://github.com/mad-ady/odroid-cpu-control).
User avatar
mad_ady
 
Posts: 4466
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: XU4 ubuntu 16.04 server is running very slow

Unread postby ehamdja » Mon Sep 17, 2018 3:27 pm

Basically anything that I do take time. For example just doing dmesg took maybe longer than 5 secs. At first I thought it's my connection since I'm accessing it remotely (headless) with webmin using my laptop. Then I tried to hook it with monitor and accessing directly from XU4, result still the same, super lagging. Another example when I just tried apt-get update....takes more than 5 secs to ask for sudo password....
I tried using sudo top and cpu and memory percentage all below 5%, how weird...
ehamdja
 
Posts: 10
Joined: Wed Nov 16, 2016 8:41 am
languages_spoken: english
ODROIDs: XU4

Re: XU4 ubuntu 16.04 server is running very slow

Unread postby mad_ady » Mon Sep 17, 2018 3:38 pm

Ok, show me the output of:
Code: Select all
hostname
cat /etc/hosts
cat /etc/resolv.conf
sudo service resolvconf status
User avatar
mad_ady
 
Posts: 4466
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: XU4 ubuntu 16.04 server is running very slow

Unread postby ehamdja » Mon Sep 17, 2018 6:23 pm

Code: Select all
hostname

erickh-odroidXU4

Code: Select all
cat /etc/hosts

127.0.0.1 odroid
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Code: Select all
cat /etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search socal.rr.com

Code: Select all
sudo service resolvconf status

‚óŹ resolvconf.service - Nameserver information manager
Loaded: loaded (/lib/systemd/system/resolvconf.service; enabled; vendor preset: enabled)
Active: active (exited) since Sun 2018-09-16 21:58:34 PDT; 4h 24min ago
Docs: man:resolvconf(8)
Process: 355 ExecStart=/sbin/resolvconf --enable-updates (code=exited, status=0/SUCCESS)
Process: 350 ExecStartPre=/bin/touch /run/resolvconf/postponed-update (code=exited, status=0/SUCCESS)
Process: 288 ExecStartPre=/bin/mkdir -p /run/resolvconf/interface (code=exited, status=0/SUCCESS)
Main PID: 355 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/resolvconf.service

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
ehamdja
 
Posts: 10
Joined: Wed Nov 16, 2016 8:41 am
languages_spoken: english
ODROIDs: XU4

Re: XU4 ubuntu 16.04 server is running very slow

Unread postby mad_ady » Mon Sep 17, 2018 7:07 pm

Well, there's your problem. Your hostname is not in the /etc/hosts file. Change this line in /etc/hosts:
Code: Select all
127.0.0.1 odroid erickh-odroidXU4

Save and it should magically run faster.

The problem with the name is that if the hostname can't be resolved to an IP address, lots of services will wait and time out (especially network, GUI).
User avatar
mad_ady
 
Posts: 4466
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: XU4 ubuntu 16.04 server is running very slow

Unread postby ehamdja » Tue Sep 18, 2018 12:48 pm

You sir are my savior! Thank you, thank you and thank you. Just as you suggested and explained, I changed the hosts file to
Code: Select all
127.0.0.1 erickh-odroidXU4
and back to normal speed. I wish I could treat you lunch :D still a lot for me to learn about this. I admire people who would spend their time to help random people on the internet and for that, i thank you sir, maybe one day i'll pay it forward :)
ehamdja
 
Posts: 10
Joined: Wed Nov 16, 2016 8:41 am
languages_spoken: english
ODROIDs: XU4

Re: XU4 ubuntu 16.04 server is running very slow

Unread postby mad_ady » Tue Sep 18, 2018 2:41 pm

I'm free at noon, but I must warn you, I'm a big eater! :D

Joking aside, I'm always happy to help and I guess I like to stick around forums such as this in part to learn more and also for the feeling you get when you can help someone (I'm sure a psychiatrist would call it a nasty addiction).

You can repay me by helping others when you can.

And regarding your problem - I ran into it in my youth as well and ran around in circles trying to figure it out so it's easy for me to remember the symptoms and solution.
User avatar
mad_ady
 
Posts: 4466
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1


Return to Ubuntu

Who is online

Users browsing this forum: freefall99 and 3 guests