How do I figure out what is causing my bottleneck?

Moderators: odroid, mdrjr

How do I figure out what is causing my bottleneck?

Unread postby wotan2525 » Sat May 12, 2018 12:59 am

Building a media server with a C2. It will be serving Plex files up via my LAN and downloading media with radarr and sonarr. I have everything setup using DietPi and docker. Software is running great with no real errors. But the throughput on SABNzbd or NZBGet is miserable. My main PC can maintain 15+ MB/s. I understand this is a low power device and may not be that fast, but it's stuck well below 5MB/s. I've tried both download clients and they seem to act the same. The real mystery is that I'm not seeing any issues in htop or anywhere else that I know of.

Image

CPU temp is low (91F)
Swap isn't full
Memory is available
CPU isn't overloaded

Any ideas how I can figure out where the bottleneck is?
wotan2525
 
Posts: 9
Joined: Sat May 12, 2018 12:55 am
languages_spoken: english
ODROIDs: C2

Re: How do I figure out what is causing my bottleneck?

Unread postby odroid » Sat May 12, 2018 1:29 am

Check the current CPU governor.
Code: Select all
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

If it is "ondemand" or "interactive", change it to "performance".
User avatar
odroid
Site Admin
 
Posts: 27741
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: How do I figure out what is causing my bottleneck?

Unread postby rooted » Sat May 12, 2018 2:24 am

Looks to be like you have ran out of memory and the device is swapping, this would definitely slow things down.
User avatar
rooted
 
Posts: 4720
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: How do I figure out what is causing my bottleneck?

Unread postby wotan2525 » Sat May 12, 2018 3:18 am

odroid wrote:Check the current CPU governor.
Code: Select all
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

If it is "ondemand" or "interactive", change it to "performance".


It was set to ondemand. I have changed it to performance. I'll see what happens.
wotan2525
 
Posts: 9
Joined: Sat May 12, 2018 12:55 am
languages_spoken: english
ODROIDs: C2

Re: How do I figure out what is causing my bottleneck?

Unread postby wotan2525 » Sat May 12, 2018 3:19 am

rooted wrote:Looks to be like you have ran out of memory and the device is swapping, this would definitely slow things down.


htop is showing ~700mb free, though? Would it make sense to increase the swap or adjust another setting to help with this?
wotan2525
 
Posts: 9
Joined: Sat May 12, 2018 12:55 am
languages_spoken: english
ODROIDs: C2

Re: How do I figure out what is causing my bottleneck?

Unread postby rooted » Sat May 12, 2018 5:37 am

wotan2525 wrote:
rooted wrote:Looks to be like you have ran out of memory and the device is swapping, this would definitely slow things down.


htop is showing ~700mb free, though? Would it make sense to increase the swap or adjust another setting to help with this?
If you had actual memory free it shouldn't be swapping.

Check the swappiness value.
User avatar
rooted
 
Posts: 4720
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: How do I figure out what is causing my bottleneck?

Unread postby wotan2525 » Sat May 12, 2018 6:18 am

DietPi sets the swappiness at 1 and my swap file was set to 320mb. I disabled it completely to see if that helped but it doesn't appear to have changed much. I wonder why SabNZBd is caching so much into mem when I have it's cache set to 200mb?
wotan2525
 
Posts: 9
Joined: Sat May 12, 2018 12:55 am
languages_spoken: english
ODROIDs: C2

Re: How do I figure out what is causing my bottleneck?

Unread postby rooted » Sat May 12, 2018 6:21 am

Can't help there as I don't use the software, perhaps someone will be along with an idea.
User avatar
rooted
 
Posts: 4720
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: How do I figure out what is causing my bottleneck?

Unread postby wotan2525 » Sat May 12, 2018 6:40 am

Also -- any idea why my system only shows as having 1.68gb of memory?
wotan2525
 
Posts: 9
Joined: Sat May 12, 2018 12:55 am
languages_spoken: english
ODROIDs: C2

Re: How do I figure out what is causing my bottleneck?

Unread postby meveric » Sat May 12, 2018 8:02 am

wotan2525 wrote:DietPi sets the swappiness at 1 and my swap file was set to 320mb. I disabled it completely to see if that helped but it doesn't appear to have changed much. I wonder why SabNZBd is caching so much into mem when I have it's cache set to 200mb?

Swappiness = 1 means it should only swap if absolutely necessary if that's the case and you still see that SWAP is used, at one point your entire RAM was filled. Which is no wonder looking at all the programs you're running, mono, python and java seem to use a lot of RAM. And there also seem to be docker container running as well?
You Should increase SWAP or better use ZRAM instead of real swap and hope it helps speeding things up.

wotan2525 wrote:Also -- any idea why my system only shows as having 1.68gb of memory?

Cause some of the RAM is used for GPU/VPU if you check /boot/boot.ini you will find some settings to disable HDMI output and VPU support, this will increase memory somewhat, but also means you can't run videos hardware decoded, or output stuff on a Display, depending on what you disable.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 8636
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: How do I figure out what is causing my bottleneck?

Unread postby wotan2525 » Sat May 12, 2018 12:10 pm

Thank you. This is running completely headless so no video memory is needed.

I'm running all of my services via linuxserver.io docker containers via docker compose. Would it be less resource intensive if I installed and ran these outside of the container? I had mono issues with radarr and sonarr but don't doubt the others may run better as regular apps?
wotan2525
 
Posts: 9
Joined: Sat May 12, 2018 12:55 am
languages_spoken: english
ODROIDs: C2

Re: How do I figure out what is causing my bottleneck?

Unread postby rooted » Sat May 12, 2018 12:19 pm

Nothing inherently wrong with containers, but I have to assume on a low power SBC such as the C2 native would be a bit more efficient.

I would at least give it a try if you have a spare SD card laying around.

On my VPS I run everything in containers without any noticeable performance hit, although this is a relatively powerful E5-2650 Intel Xeon. On one XU4 I run a few things with docker but it is much more powerful vs the C2.

Also as meveric stated, go ahead and set:

Code: Select all
 setenv nographics "1"
User avatar
rooted
 
Posts: 4720
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: How do I figure out what is causing my bottleneck?

Unread postby wotan2525 » Tue May 15, 2018 3:16 am

rooted wrote:
Also as meveric stated, go ahead and set:

Code: Select all
 setenv nographics "1"


OK, solved my speed issues. Changed my incoming directory from the SD card to the USB hard drive and all of the problems went away. Load is way down and speeds are so much more consistent at ~15MB/s.

But.... I can't get the setenv nographics to stick. I edit the /boot/boot.ini file, save it and then reboot and it's set back to "0" and my available ram is only 1.69gb.
wotan2525
 
Posts: 9
Joined: Sat May 12, 2018 12:55 am
languages_spoken: english
ODROIDs: C2

Re: How do I figure out what is causing my bottleneck?

Unread postby odroid » Tue May 15, 2018 3:38 am

You had to edit /media/boot/boot.ini probably even I'm not sure the location of boot.ini file in DietPi image.
Check "dmesg" output to confirm the kernel parameter.
User avatar
odroid
Site Admin
 
Posts: 27741
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: How do I figure out what is causing my bottleneck?

Unread postby wotan2525 » Tue May 15, 2018 4:21 am

Got it. DietPi does something weird and the boot.ini is not preserved across sessions. There was another one in /DietPi/boot.ini that I edited and kicked in after a reboot. Thanks!
wotan2525
 
Posts: 9
Joined: Sat May 12, 2018 12:55 am
languages_spoken: english
ODROIDs: C2

Re: How do I figure out what is causing my bottleneck?

Unread postby odroid » Tue May 15, 2018 4:35 am

Glad to hear you figured it out.
How much RAM do you have now?
User avatar
odroid
Site Admin
 
Posts: 27741
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: How do I figure out what is causing my bottleneck?

Unread postby wotan2525 » Tue May 15, 2018 5:13 am

Code: Select all
dietpi@DietPi:~$ cat /proc/meminfo
MemTotal:        2032564 kB
wotan2525
 
Posts: 9
Joined: Sat May 12, 2018 12:55 am
languages_spoken: english
ODROIDs: C2


Return to Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron