【经验分享】AMD Embedded R2000 处理器在极限负载下的Linux实时性能测试结果

2024-07-16 10:55:26 浏览数 (1)

之前使用FFT运算、C程序编译,网络通信作为负载,测试了AMD Embedded R2000 在Linux下的实时性能。

最近使用Stress-ng的任务作为负载,再次测试了AMD Embedded R2000 在Linux下的实时性能。Stress-ng能产生更极限的负载,比如DDR带宽使用可以达到10GBps。另外还运行了3个glxgears任务,模拟GPU操作对系统的负载。这种情况,对系统的挑战更大。

测试时,使用一个CPU作为普通CPU,运行常规任务和负载任务;其它CPU作为实时CPU,运行实时任务。在测试中,每个CPU运行一个cyclictest的线程来测量实时性能,以实时CPU的cyclictest latency数据作为实时性能测试结果,忽略普通CPU的cyclictest latency数据。

这样测试18天后,实时CPU的cyclictest latency最大是14us。

cyclictest的记录如下:

代码语言:javascript复制
r2000:/home/xilinx/cyclictest-0612b# tail -n 30 cyclictest_load.sh*-glx.3-log.txt
policy: fifo: loadavg: 18.74 18.98 19.03 20/236 7019
 
T: 0 ( 3564) P:99 I:125 C:13816897496 Min:      1 Act:    3 Avg:    2 Max:     361
T: 1 ( 3565) P:99 I:125 C:13816897493 Min:      2 Act:    5 Avg:    5 Max:      13
T: 2 ( 3566) P:99 I:125 C:13816857500 Min:      2 Act:    5 Avg:    4 Max:      14
T: 3 ( 3567) P:99 I:125 C:13816857497 Min:      4 Act:    5 Avg:    4 Max:      14

系统信息如下:

代码语言:javascript复制
r2000:/home/xilinx# uname -a
Linux r2000 5.0.19-rt11-yocto-preempt-rt #1 SMP PREEMPT RT Tue Jun 11 07:34:36 UTC 
2024 x86_64 x86_64 x86_64 GNU/Linux
r2000:/home/xilinx# lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Vendor ID:           AuthenticAMD
CPU family:          23
Model:               24
Model name:          AMD Ryzen Embedded R2544 with Radeon Graphics
Stepping:            1
CPU MHz:             3325.598
CPU max MHz:         3350.0000
CPU min MHz:         1600.0000
BogoMIPS:            6688.12
Virtualization:      AMD-V
L1d cache:           32K
L1i cache:           64K
L2 cache:            512K
L3 cache:            4096K
NUMA node0 CPU(s):   0-3
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt 
pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid
 aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt
 aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm 
sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core
 perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd sev ibpb vmmcall
 fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt 
xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock 
nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter 
pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca

r2000:/home/xilinx# cat /proc/cmdline
BOOT_IMAGE=/bzImage root=PARTUUID=5f0f822f-4633-4410-b63d-8854abe31035 
rw rootwait quiet console=tty0 console=ttyS0,115200n8 
rcupdate.rcu_cpu_stall_suppress=1 mce=off hpet=disable 
numa_balancing=disable igb.blacklist=no rcu_nocb_poll=1024 rootwait 
clocksource=tsc tsc=reliable art=virtallow no_ipi_broadcast=1 
nosoftlockup audit=0 nmi_watchdog=0 irqaffinity=0 isolcpus=1-15 
rcu_nocbs=1-15 nohz_full=1-15 processor.max_cstate=0 
processor_idle.max_cstate=0 console=ttyS0,115200n8 console=tty0 
rootfstype=ext4,ext3,ext2

r2000:/home/xilinx# cat /proc/uptime
1727677.04 5183530.30
r2000:/home/xilinx# uptime -p
up 2 weeks, 5 days, 23 hours, 54 minutes
r2000:/home/xilinx# uptime
 09:39:10 up 19 days, 23:54,  2 users,  load average: 18.98, 19.03, 19.05
r2000:/home/xilinx# last -x reboot

wtmp begins Mon Jul  1 00:00:06 2024

r2000:/home/xilinx# cd /home/xilinx/cyclictest*

r2000:/home/xilinx/cyclictest-0612b# ps -eLF | head -n 3 && ps -eLF | grep stress 
UID        PID  PPID   LWP  C NLWP    SZ   RSS PSR STIME TTY          TIME CMD
root         1     0     1  0    1 22676  6996   0 Jun13 ?        00:10:28 /sbin/init nosoftlockup
root         2     0     2  0    1     0     0   0 Jun13 ?        00:00:00 [kthreadd]
root      2441   851  2441  0    1  4613  5412   0 Jun13 pts/2    00:00:00
 stress-ng -t 30d  --vm 2 --vm-bytes 128M
root      2448  2441  2448  4    1  4615  1664   0 Jun13 pts/2    21:33:27
 stress-ng -t 30d  --vm 2 --vm-bytes 128M

r2000:/home/xilinx/cyclictest-0612b#  ps -eLF | grep glx
root      2442   851  2442  0    5 105517 81096  0 Jun13 pts/2    03:25:40 glxgears
root      2442   851  2474  4    5 105517 81096  0 Jun13 pts/2    21:33:27 glxgears
root      2442   851  2475  4    5 105517 81096  0 Jun13 pts/2    21:33:27 glxgears
root      2442   851  2476  4    5 105517 81096  0 Jun13 pts/2    21:33:27 glxgears
root      2442   851  2477  4    5 105517 81096  0 Jun13 pts/2    21:33:27 glxgears
root      2443   851  2443  0    5 105486 80488  0 Jun13 pts/2    04:06:03 glxgears
root      2443   851  2466  4    5 105486 80488  0 Jun13 pts/2    21:33:27 glxgears
root      2443   851  2467  4    5 105486 80488  0 Jun13 pts/2    21:33:27 glxgears
root      2443   851  2468  4    5 105486 80488  0 Jun13 pts/2    21:33:27 glxgears
root      2443   851  2469  4    5 105486 80488  0 Jun13 pts/2    21:33:27 glxgears
root      2444   851  2444  0    5 105514 80672  0 Jun13 pts/2    03:34:05 glxgears
root      2444   851  2470  4    5 105514 80672  0 Jun13 pts/2    21:33:27 glxgears
root      2444   851  2471  4    5 105514 80672  0 Jun13 pts/2    21:33:27 glxgears
root      2444   851  2472  4    5 105514 80672  0 Jun13 pts/2    21:33:27 glxgears
root      2444   851  2473  4    5 105514 80672  0 Jun13 pts/2    21:33:27 glxgears
Wed Jul  3 09:39:04 UTC 2024

/proc/uptime:
1727673.02 5183518.24

可以见到,AMD Embedded X86处理器拥有优秀的实时性能。

测试结果,与BIOS设置、Linux编译选型和设置、系统负载有关。请联系对应的FAE、或者hank.fu@amd.com,获取更详细的信息。

0 人点赞