The ConnectCore 8X SOM variant included in the development kit has the following specifications:

Number of cores

4

RAM size

2GB

Digi offers the ConnectCore 8X SOM in different configurations, typically with different number of cores and RAM memory size. This topic explains how you can simulate a variant with fewer cores and/or less RAM memory and verify how well it performs for your application.

Limit the number of operating cores

You can check the number of operating cores by looking at the kernel boot messages:

# dmesg | grep -i cpu
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.006195] smp: Bringing up secondary CPUs ...
[    0.008550] smp: Brought up 1 node, 4 CPUs
[    1.926581] ledtrig-cpu: registered to indicate activity on CPUs

Deactivate cores at run-time

To deactivate a certain core at run-time:

# echo 0 > /sys/devices/system/cpu/cpuX/online

where X is the index of the core that you want to deactivate.

To deactivate a core from your application code, you can use the APIX library. See Manage CPU cores.

Deactivate cores at boot time

You can use the kernel command line argument maxcpus=N to limit the number of cores that will operate in Linux. For example, to limit the number of cores to 2, append the following to the environment variable extra_bootargs:

=> env edit extra_bootargs
edit: maxcpus=2
If you want to keep this setting across reboots, save the environment with saveenv.

Boot Linux with this configuration and verify the number of active cores:

# dmesg | grep -i cpus
[    0.000000] Kernel command line: console=ttyLP2,115200 root=PARTUUID=1c606ef5-f1ac-43b9-9bb5-d5c578580b6b rootwait rw fbcon=logo-pos:center maxcpus=2
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[    0.006210] smp: Bringing up secondary CPUs ...
[    0.007099] smp: Brought up 1 node, 2 CPUs
[    1.896259] ledtrig-cpu: registered to indicate activity on CPUs

Check the status of cores with:

# grep "" /sys/devices/system/cpu/cpu*/online
/sys/devices/system/cpu/cpu0/online:1
/sys/devices/system/cpu/cpu1/online:1
/sys/devices/system/cpu/cpu2/online:0
/sys/devices/system/cpu/cpu3/online:0

In the status log above, only the first two cores are online.

Simulate a smaller RAM size

You can check the current RAM size by looking at the kernel boot messages:

# dmesg | grep -i memory
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000096000000, size 640 MiB
[    0.000000] Early memory node ranges
[    0.000000] Memory: 1188060K/2015232K available (14652K kernel code, 1050K rwdata, 4584K rodata, 2496K init, 1035K bss, 171812K reserved, 655360K cma-reserved)
[    0.140943] No USDPAA memory, no 'fsl,usdpaa-mem' in device-tree
[    3.668498] Freeing unused kernel memory: 2496K

You can use the kernel command line argument mem=size to limit the amount of RAM memory available to Linux. For example, to limit the RAM memory to 512 MB, append the following to the environment variable extra_bootargs:

=> env edit extra_bootargs
edit: mem=512M
If you want to keep this setting across reboots, save the environment with saveenv.

Boot Linux with this configuration and verify the available memory:

# dmesg | grep -i memory
[    0.000000] Memory limited to 512MB
[    0.000000] Reserved memory: created CMA memory pool at 0x000000009a000000, size 96 MiB
[    0.000000] Early memory node ranges
[    0.000000] Memory: 196060K/444416K available (14652K kernel code, 1050K rwdata, 4584K rodata, 2496K init, 1035K bss, 150052K reserved,98304K cma-reserved)
[    0.123944] No USDPAA memory, no 'fsl,usdpaa-mem' in device-tree
[    3.608580] Freeing unused kernel memory: 2496K