This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-AM335X: Weston performance issue

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

hello

I am work on custom am335x board based on,use ti-processor-sdk-linux-rt-am335x-evm-04.03.00.05-Linux-x86-Install.bin。

I run weston-simple-egl in terminal:

root@am335x-evm:~# weston-simple-egl
wlpvr: PVR Services Initialised
101 frames in 5 seconds: 20.200001 fps
101 frames in 5 seconds: 20.200001 fps
100 frames in 5 seconds: 20.000000 fps

my LCD is 1280X800.

my question is :

how can i know cpu  running freq

how can i improve it performance to nomal 60 fps

by the way:

root@am335x-evm:~# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 996.14
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2

Hardware : Generic AM33XX (Flattened Device Tree)
Revision : 0000
Serial : 0000000000000000

  • You will need to check if CPU is bottleneck or 3D graphics hardware accelerator. To check load on 3D graphics accelerator, please use the PVR tools.

    To see CPU load, you can always use "top" cmd.

    To check CPU frequency -

    1. Change the governor to "performance". By default it is "ondemand" so when the CPU is doing nothing, you’ll see 300MHz. When you have a lot of activity, you’ll see max cpu speed.

    #echo performance /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

    2. Verify the governor mode

    #root@am335x-evm:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_governor

    performance

    #cat/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

  • Thanks your reply !

    To Run Top,I got this :

    top - 15:28:28 up 6 min, 1 user, load average: 0.00, 0.16, 0.11
    Tasks: 98 total, 1 running, 97 sleeping, 0 stopped, 0 zombie
    %Cpu(s): 0.5 us, 0.5 sy, 0.0 ni, 99.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
    KiB Mem : 508100 total, 396292 free, 37680 used, 74128 buff/cache
    KiB Swap: 20476 total, 20476 free, 0 used. 447224 avail Mem

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    723 root 20 0 3152 1820 1388 R 0.7 0.4 0:00.30 top
    17 root 20 0 0 0 0 S 0.2 0.0 0:00.39 kworker/0:1
    1 root 20 0 5204 3884 2720 S 0.0 0.8 0:03.87 systemd
    2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
    3 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/0
    4 root -2 0 0 0 0 S 0.0 0.0 0:00.16 ktimersoftd/0
    6 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
    8 root -2 0 0 0 0 S 0.0 0.0 0:00.07 rcu_preempt
    9 root -2 0 0 0 0 S 0.0 0.0 0:00.00 rcu_sched
    10 root -2 0 0 0 0 S 0.0 0.0 0:00.00 rcub/0
    11 root -2 0 0 0 0 S 0.0 0.0 0:00.17 rcuc/0
    12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kswork
    13 root rt 0 0 0 0 S 0.0 0.0 0:00.00 posixcputmr/0
    14 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kdevtmpfs
    15 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
    16 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/26-44e07000
    18 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/59-4804c000
    19 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/92-481ac000
    20 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/125-481ae00
    21 root 20 0 0 0 0 S 0.0 0.0 0:00.00 oom_reaper
    22 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 writeback
    23 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kcompactd0
    24 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 crypto
    25 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
    26 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd
    27 root -51 0 0 0 0 S 0.0 0.0 0:00.13 irq/20-49000000
    28 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/22-49000000
    29 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 edac-poller
    30 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 watchdogd
    31 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 rpciod
    32 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 xprtiod
    33 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kswapd0
    34 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 nfsiod
    43 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kpcitest
    44 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/180-4831000
    45 root -51 0 0 0 0 S 0.0 0.0 0:00.25 irq/176-tilcdc
    46 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/175-4808000
    47 root 20 0 0 0 0 S 0.0 0.0 0:00.04 kworker/u2:1
    49 root -51 0 0 0 0 S 0.0 0.0 0:00.03 irq/172-4a10000
    50 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/173-4a10000
    51 root -51 0 0 0 0 S 0.0 0.0 0:00.24 irq/161-mmc0
    52 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/140-4806000
    53 root 20 0 0 0 0 S 0.0 0.0 0:00.09 kworker/0:2
    54 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ipv6_addrconf
    55 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/177-gpmc
    56 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/159-44e0b00
    57 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/160-4802a00
    59 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
    60 root 20 0 0 0 0 S 0.0 0.0 0:00.89 mmcqd/0
    62 root 0 -20 0 0 0 S 0.0 0.0 0:00.12 kworker/0:1H
    63 root 20 0 0 0 0 S 0.0 0.0 0:00.03 jbd2/mmcblk0p2-
    64 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ext4-rsv-conver
    85 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 cryptodev_queue
    92 root 20 0 10556 2608 2392 S 0.0 0.5 0:01.26 systemd-journal
    95 root 20 0 10972 2624 2028 S 0.0 0.5 0:01.11 systemd-udevd
    100 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u2:2
    145 systemd+ 20 0 12408 1660 1416 S 0.0 0.3 0:00.11 systemd-timesyn
    173 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/187-4740000
    182 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/169-rtc0
    188 root -51 0 0 0 0 S 0.0 0.0 0:00.00 irq/170-rtc0
    202 root 20 0 1952 1144 1088 S 0.0 0.2 0:00.12 syslogd
    206 root 20 0 2324 1444 960 S 0.0 0.3 0:00.02 crond



    I check this path"/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" but I am not found this file.


    ls /sys/devices/system/cpu/cpu0/
    crash_notes crash_notes_size of_node power subsystem topology uevent

    Did I missed some configuration in kernel?
  • In this afternoon :
    I switch to ti-processor-sdk-linux-am335x-evm-04.03.00.05-Linux-x86-Install.bin,not before rt version.
    I found the cpufreq path and file /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor.
    I got CPU freq throuth cmd "cat/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq".
    The result is 1000000,Its ok.this is not a issue.

    by the way ,
    I switch LCD to it's default 800x480.
    run cmd:"weston-simple-egl ",still got 31 fps,not 60 fps I hoped.
    Why ? In your nomal machine, how much you get to run command "weston-simple-egl ". this is realy a problem ?

    root@am335x-evm:~# weston-simple-egl
    wlpvr: PVR Services Initialised
    156 frames in 5 seconds: 31.200001 fps
    155 frames in 5 seconds: 31.000000 fps
    155 frames in 5 seconds: 31.000000 fps
    155 frames in 5 seconds: 31.000000 fps
  • Hi Lin,

    Yes, we see 31 fps for 800x480.

    I suggest you to run PVRTune tool to bennchmark 3D graphics accelerator load and see if it is a bottleneck. If it is indeed a bottleneck, then this is what AM335x device can do.

    Regards,
    Manisha
  • Thanks very much !
    I down PVRTune and checked. but do not find any thring wrong. the max fps is about 20 ;
    But when I try run my app in -platform eglfs .Use PVRTune I got about 60 fps . I think mybe in weston enviroment some thing is not right.

    so i decision run my app in use "-platform eglfs".if you have any suggest,please tell me !
    thanks again!
  • Hi Lin,

    lin yang39 said:
    I down PVRTune and checked. but do not find any thring wrong. the max fps is about 20 ;

    Did you mean to say that using PVRTune tool, you do not find SGX as bottleneck?

    Does your application need to use weston manager or can work in full screen mode?

    Is this your own application running at full 60 fps when using eglfs vs 20 fps when using Weston?  

  • Yes, I do not find SGX as bottleneck. Maybe I'm not good at using it.
    my application running at full 60 fps,but 20 fps when using weston.
    my application use full screen mode.
    to me , weston is not neccessary.
  • If you do not need weston manager for your application, I suggest that you continue with full screen mode - eglfs.

    We won't be able to comment why the weston application is running 3x slower compared to full screen mode, unless we look at the code.
  • ok,thanks very much