Work arounds, tips, and tricks

Post Reply
crashoverride
Posts: 4177
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Work arounds, tips, and tricks

Unread post by crashoverride » Tue Feb 20, 2018 4:15 am

I am making this thread to centrally locate information spread across other threads. Hopefully, it will be useful to others:

- Network failure workaround

Code: Select all

sudo ethtool -K eth0 rx off tx off
- HDD performance

Code: Select all

echo performance | sudo tee /sys/module/pcie_aspm/parameters/policy
- GPU performance

Code: Select all

echo performance | sudo tee /sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu/governor
- CPU performance

Code: Select all

sudo cpufreq-set -c 0-5 -g performance
[edit]
- Fan always on

Code: Select all

echo 20000 | sudo tee /sys/devices/virtual/thermal/thermal_zone0/trip_point_0_temp
Last edited by crashoverride on Tue Feb 20, 2018 6:26 am, edited 1 time in total.

mlinuxguy
Posts: 793
Joined: Thu Feb 28, 2013 10:28 am
languages_spoken: english
ODROIDs: X, X2, XU, XU3, XU4, C1, C1+, C2, N1, USB-IO
Contact:

Re: Work arounds, tips, and tricks

Unread post by mlinuxguy » Tue Feb 20, 2018 5:45 am

crashoverride wrote:I am making this thread to centrally locate information spread across other threads. Hopefully, it will be useful to others:
- Fan always on

Code: Select all

echo 20000 | sudo tee /sys/devices/virtual/thermal/thermal_zone0/trip_point_0_temp
^^^ add the tee command
Add this to your users .vimrc to prevent visual mode when cut 'n pasting into a terminal VIM session

Code: Select all

set mouse-=a

joy
Posts: 611
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: Work arounds, tips, and tricks

Unread post by joy » Tue Feb 20, 2018 9:42 am

- Network performance
( improved performance is shown specially with Network storage mounted as Samba. ;) )

Code: Select all

#!/bin/bash
ETH0_IRQ=`cat /proc/interrupts | grep "eth0" | awk -F : '{print $1}'`
echo 4-5 > /proc/irq/${ETH0_IRQ}/smp_affinity_list

elatllat
Posts: 1116
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1
Contact:

Re: Work arounds, tips, and tricks

Unread post by elatllat » Tue Feb 20, 2018 11:48 am

Quantify "improved"?

I feel compelled to rant to anyone coding with characters not on a keyboard;

Code: Select all

echo 4-5 > "/proc/irq/$(grep eth0 /proc/interrupts | cut -d : -f 1)/smp_affinity_list"
read how to code properly by shellcheck, and google.



.
Last edited by elatllat on Sun Apr 29, 2018 5:05 am, edited 2 times in total.

mlinuxguy
Posts: 793
Joined: Thu Feb 28, 2013 10:28 am
languages_spoken: english
ODROIDs: X, X2, XU, XU3, XU4, C1, C1+, C2, N1, USB-IO
Contact:

Re: Work arounds, tips, and tricks

Unread post by mlinuxguy » Tue Feb 20, 2018 3:10 pm

if you have any task hang the N1 will panic and crash

Code: Select all

   root@odroid:~# sysctl -a | grep hung
    kernel.hung_task_check_count = 4194304
    kernel.hung_task_panic = 1
    kernel.hung_task_timeout_secs = 120
    kernel.hung_task_warnings = 10
add this line to /etc/sysctl.conf to stop that behavior
root@odroid:~# tail /etc/sysctl.conf
kernel.hung_task_panic=0

tkaiser
Posts: 667
Joined: Mon Nov 09, 2015 12:30 am
languages_spoken: english
ODROIDs: C1+, C2, XU4, HC1
Contact:

Re: Work arounds, tips, and tricks

Unread post by tkaiser » Tue Feb 20, 2018 8:12 pm

joy wrote:ETH0_IRQ=`cat /proc/interrupts | grep "eth0" | awk -F : '{print $1}'`
echo 4-5 > /proc/irq/${ETH0_IRQ}/smp_affinity_list
[/code]
Without filtering out the space from ' 24' all you should get with this is just an 'ambiguous redirect'. I would better use syntax known to work, e.g.: https://github.com/ayufan-rock64/linux- ... ormance.sh (it's RK33xx and 3328 vs 3399 do not matter at all)

And until these two issues viewtopic.php?f=150&t=30126#p215699 aren't fixed IMO it's not a good idea trying to 'masquerade' low performance by sending eth0 IRQs to the big cores instead of solving the problems. At least on my board RX performance is pretty low and this won't change until correct RX/TX delays are configured (I mean, all the hard work has already been done, it's just pulling in patches into N1 kernel, running the test script and then adjusting the DT)

In the meantime I wonder how the LanTest results shown in viewtopic.php?f=7&t=29932 have been created? Was this a different board revision (trace length differences between SoC and RTL8211)? Or other DT settings? At least I get very low RX values while TX is well above 100 MB/s.

User avatar
rooted
Posts: 6094
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: Work arounds, tips, and tricks

Unread post by rooted » Thu Feb 22, 2018 1:55 am

This should be sticky.

*edit*
It is sticky, sorry didn't see it.

joy
Posts: 611
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Contact:

Re: Work arounds, tips, and tricks

Unread post by joy » Wed Feb 28, 2018 1:42 pm

tkaiser wrote: And until these two issues viewtopic.php?f=150&t=30126#p215699 aren't fixed IMO it's not a good idea trying to 'masquerade' low performance by sending eth0 IRQs to the big cores instead of solving the problems. At least on my board RX performance is pretty low and this won't change until correct RX/TX delays are configured (I mean, all the hard work has already been done, it's just pulling in patches into N1 kernel, running the test script and then adjusting the DT)
Very sorry for late response.
I was tackling this topic from the wrong way up. Sorry. :(
Right, I agree with all of you that it's not a right approach, but just deception.
We're trying to optimizing network performance based on you and other users' knowledge and suggestions.
viewtopic.php?f=150&t=30126#p215659
tkaiser wrote: In the meantime I wonder how the LanTest results shown in viewtopic.php?f=7&t=29932 have been created? Was this a different board revision (trace length differences between SoC and RTL8211)? Or other DT settings? At least I get very low RX values while TX is well above 100 MB/s.
For test, I tried to find better settings with LanTest and the trick I mentioned was also included.
Among items that I tried, the following two settings affect the performance conspicuously.
Just for information, I'm sharing them here.

1. The irq eth0 is assigned to big cores, CPU4-CPU5.

Code: Select all

# echo 4-5 > /proc/irq/24/smp_affinity_list
2. smb.conf is adjusted as following.

Code: Select all

[global]
server signing = No
write raw = Yes
read raw = Yes
getwd cache = Yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
min receivefile size = 2048

[share]
comment = share directory
path = /media/disk
browseable = Yes
guest ok = Yes
read only = No
create mask = 0777

## Turning
write cache size = 1024000
use sendfile = Yes
strict allocate = Yes
allocation roundup size = 4096
oplocks = Yes
aio read size = 16384
aio write size = 16384

User avatar
AreaScout
Posts: 720
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4, XU4Q, N1, Go, VU5A, Show2, CloudShell2, H2
Contact:

Re: Work arounds, tips, and tricks

Unread post by AreaScout » Tue Mar 13, 2018 3:48 pm

Video driver SDL2 settings:

On our ODROID boards we got an unique SDL2 package from ODROID repositories build with --disable-video-opengl flag, so SDL2 did not dlopen any Mesa OpenGL library found on the system and to enable GLES context only
which brought as faster drawings (HW acceleration)

On ODROID-N1 we can use a new configure switch --enable-video-kmsdrm to compile SDL2 with kms/drm support which is working due do gbm enabled userspace libraries, you need at least SDL2 >= 2.0.6 for that to work

if you start your application over ssh with DISPLAY=:0.0 prefixed, it will use x11, if you start it without this prefix it will use kms/drm

if you are building an image without x11 running (retropie, recalbox a.s.o) or just want to choose which video driver is used, you can set the environment variable SDL_VIDEODRIVER either to x11 or kmsdrm

RG
Last edited by AreaScout on Wed Jun 27, 2018 10:19 pm, edited 2 times in total.

User avatar
memeka
Posts: 4080
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: Work arounds, tips, and tricks

Unread post by memeka » Tue Mar 13, 2018 4:31 pm

kmsdrm works on xu4 too, with the wayland drivers
Maybe mdrjr can compile a x11 Mali driver with gbm included.

User avatar
AreaScout
Posts: 720
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: english, german
ODROIDs: X2, U3, XU3, C2, XU4, XU4Q, N1, Go, VU5A, Show2, CloudShell2, H2
Contact:

Re: Work arounds, tips, and tricks

Unread post by AreaScout » Tue Mar 13, 2018 4:44 pm

memeka wrote:kmsdrm works on xu4 too, with the wayland drivers
Maybe mdrjr can compile a x11 Mali driver with gbm included.
that would be super cool ! :) 8-)

scpcom
Posts: 77
Joined: Thu Jun 23, 2016 8:07 am
languages_spoken: english
Contact:

Re: Work arounds, tips, and tricks

Unread post by scpcom » Sat Mar 24, 2018 1:59 am

To get boot messages on HDMI output just add "console=tty0 no_console_suspend" to boot arguments in boot.ini like this:

Code: Select all

setenv bootrootfs "swiotlb=1 console=ttyFIQ0,115200n8 console=tty0 no_console_suspend root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait rw"
Optional to get tux boot logo kernel can be build with extra flags:

Code: Select all

CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y

User avatar
rooted
Posts: 6094
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: Work arounds, tips, and tricks

Unread post by rooted » Mon Jun 11, 2018 10:15 pm

Any new quirks or workarounds found? For me the N1 has been solid as a rock.

Post Reply

Return to “Ubuntu/Debian”

Who is online

Users browsing this forum: No registered users and 0 guests