Note |
---|
This page contains outdated content related to Dunfell and Morty. It is provided here for reference purposes only. |
Info |
---|
Reference only(All changes merged to rdk-next and available in all releases) |
Tiny RDKB is an effort focused on reducing the RFS of mainline RDKB. While there are many different ways are being explored and worked upon for reducing the overall image size, this particular document is aiming at capturing the Tiny RDKB effort .
Major Highlights to be taken in RDKB RPI : Removed the Unused Modules ,XML files ,scripts, systemd files ,configuration files,libraries and binaries/executables from the RDKB RPI RFS. This should be applicable for both Morty and Dunfell builds.
NOTE: Morty and Dunfell are deprecated and in kirkstone all the below design steps are already included.
Below are the Overall steps to be taken for Tiny RDKB effort in RPI,
1.Remove sound kernel modules
2.Removal of unused file COSAXcalibur.XML
3.Replace some executables with busybox
4.Replace NTPD package with Busybox configuration
5.Removed UnUsed packages from ccsp packagegroup in RPI platfrom
6.Removed UnUsed packages from OSS packagegroup in RDKB RPI platfrom
7.Removed UnUsed and Duplicate files from RFS in RDKB RPI platfrom
8.Removed unused driver kernel modules of ath,mediatek,realtek in linux-raspberrypi
9.Removed NLS modules from linux-raspberrypi
10.Removed unused driver modules of rtc,usb,input in linux-raspberrypi
11.Removed Unused kernel driver modules of NF,Xtables,PPS,BT from linux-raspberrypi
12.Removed Unused kernel modules of HID and USB from linux-raspberrypi
13.Removed Unused kernel modules of DRM,USB_SERIAL,SPEECH,CAN,W1,YAM from linux-raspberrypi
14.Added PHP->JST Migration
15.Removed Unused packages from util-linux
16.Added nodejs package as DISTRO Features for Morty Builds
17.Removed Unused files from RFS
18.Converted Parental control features kernel modules to in-built modules for reducing the kernel size in RFS.
S.NO | Yocto Version Builds | Before Tiny RDKB Image Size | After Tiny RDKB Image Size | Difference |
---|
1 | Morty | 380MB | 224 MB | 156MB |
2 | Dunfell | 80MB(After extract the tar 448MB) | 59MB(After extract the tar 306MB) | 21MB(142MB) |
3 | Kirkstone | 103MB(After extract the tar 513MB) | 103MB(After extract the tar 513MB) -The steps mentioned in the design are included in Kirkstone | - |
Below are the ways to compare the memories in before and after the Tiny RDKB effort in RPI,
- RAM usage
- CPU Utilization
- Rootfs size on Storage Disk
This below analysis are immediately taken while the fresh image is boot-up,
Gliffy Diagram |
---|
macroId | 2bd68b86-a7d2-4476-a494-2f26cd14f30a |
---|
displayName | RAM Usage on Initial Boot-up |
---|
name | RAM Usage on Initial Boot-up |
---|
pagePin | 3 |
---|
|
Gliffy Diagram |
---|
macroId | 60c15741-1ae7-4dce-8e85-f66ad98685b4 |
---|
displayName | CPU utilization on Initial boot-up |
---|
name | CPU utilization on Initial boot-up |
---|
pagePin | 2 |
---|
|
Gliffy Diagram |
---|
macroId | 1b2d9ead-4b7e-4fa9-b2f7-77429c6406a0 |
---|
displayName | RFS on Initial boot-up |
---|
name | RFS on Initial boot-up |
---|
pagePin | 2 |
---|
|
The below analysis are taken one hour after form the fresh image boot-up,
Gliffy Diagram |
---|
macroId | 73d66c39-7a40-444e-92b2-1b5004d2643b |
---|
displayName | RAM Usage on After one hour |
---|
name | RAM Usage on After one hour |
---|
pagePin | 3 |
---|
|
Gliffy Diagram |
---|
macroId | fd964425-06a7-4f97-b836-590ed24b61c9 |
---|
displayName | CPU utilization on after 1hour |
---|
name | CPU utilization on after 1hour |
---|
pagePin | 2 |
---|
|

Below linux commands are used to find the memory usage of RAM, CPU Utilization and Rootfs Size.
S.NO | Memory Usages | Linux Commands |
---|
1 | RAM Usage | free -m |
2 | CPU Utilization | iostat / top |
3 | Rootfs Size | df -h |
Deck of Cards |
---|
startHidden | false |
---|
language | bash |
---|
theme | DJango |
---|
id | RAM Usage |
---|
title | RAM Usage - free -m |
---|
linenumbers | true |
---|
|
Card |
---|
id | RAM Usage |
---|
label | Before Tiny RDKB |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | RAM Usage |
---|
| root@RaspberryPi-Gateway:~# free -m
total used free shared buff/cache available
Mem: 924 63 827 4 39 842
Swap: 0 0 0 |
|
Card |
---|
id | RAM Usage |
---|
label | After Tiny RDKB |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | RAM Usage |
---|
| root@RaspberryPi-Gateway:~# free -m
total used free shared buff/cache available
Mem: 603 60 503 4 36 518
Swap: 0 0 0
|
|
|
Deck of Cards |
---|
startHidden | false |
---|
id | cpu utilization |
---|
loopCards | true |
---|
|
Card |
---|
default | true |
---|
label | Before Tiny RDKB |
---|
title | CPU utilization |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | CPU Utilization |
---|
| root@RaspberryPi-Gateway:~# iostat
Linux 5.4.72-v7 (RaspberryPi-Gateway) 12/09/20 _armv7l_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
19.17 0.02 26.86 0.41 2.50 53.46
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
mmcblk0 14.02 508.65 43.97 95683 8271
mmcblk0p1 0.38 3.88 0.01 729 1
mmcblk0p2 13.39 493.68 43.96 92866 8270
root@RaspberryPi-Gateway:~# |
|
Card |
---|
default | true |
---|
label | After Tiny RDKB |
---|
title | cpu utilization |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | CPU Utilization |
---|
| root@RaspberryPi-Gateway:~# iostat
Linux 5.4.72-v7 (RaspberryPi-Gateway) 03/29/21 _armv7l_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
17.72 0.02 24.32 1.94 0.00 53.98
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
mmcblk0 20.85 723.65 73.56 79435 8075
mmcblk0p1 0.58 6.66 0.01 731 1
mmcblk0p2 19.83 697.97 73.55 76616 8074 |
|
|
Deck of Cards |
---|
|
Card |
---|
label | After Tiny RDKB |
---|
title | Rootfs Size |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | Rootfs Size On Storage Disk |
---|
| root@RaspberryPi-Gateway:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 241.6M 139.5M 85.6M 62% /
devtmpfs 173.0M 0 173.0M 0% /dev
tmpfs 301.5M 4.0K 301.5M 0% /dev/shm
tmpfs 301.5M 21.4M 280.1M 7% /run
tmpfs 301.5M 0 301.5M 0% /sys/fs/cgroup
tmpfs 301.5M 2.5M 299.1M 1% /tmp
tmpfs 301.5M 328.0K 301.2M 0% /var/volatile
/dev/mmcblk0p1 50.8M 29.2M 21.6M 58% /boot
tmpfs 60.3M 0 60.3M 0% /run/user/0
root@RaspberryPi-Gateway:~# |
|
Card |
---|
id | Rootfs Size |
---|
label | Before Tiny RDKB |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | Rootfs Size On Storage Disk |
---|
| root@RaspberryPi-Gateway:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 375.7M 217.2M 135.1M 62% /
devtmpfs 333.7M 0 333.7M 0% /dev
tmpfs 462.2M 4.0K 462.2M 0% /dev/shm
tmpfs 462.2M 25.5M 436.7M 6% /run
tmpfs 462.2M 0 462.2M 0% /sys/fs/cgroup
tmpfs 462.2M 2.9M 459.3M 1% /tmp
tmpfs 462.2M 512.0K 461.7M 0% /var/volatile
/dev/mmcblk0p1 48.5M 27.4M 21.0M 57% /boot
root@RaspberryPi-Gateway:~#
|
|
|
Deck of Cards |
---|
|
Card |
---|
default | true |
---|
label | Before Tiny RDKB |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | RAM Usage |
---|
| root@RaspberryPi-Gateway:~# free -m
total used free shared buff/cache available
Mem: 924 133 712 24 78 750
Swap: 0 0 0
root@RaspberryPi-Gateway:~# |
|
Card |
---|
default | true |
---|
label | After Tiny RDKB |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | RAM Usage |
---|
| root@RaspberryPi-Gateway:~# free -m
total used free shared buff/cache available
Mem: 603 116 337 99 149 371
Swap: 0 0 0 |
|
|
Deck of Cards |
---|
|
Card |
---|
default | true |
---|
label | Before Tiny RDKB |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | CPU Utilization |
---|
| root@RaspberryPi-Gateway:~# iostat
Linux 5.4.72-v7 (RaspberryPi-Gateway) 03/29/21 _armv7l_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
4.63 0.01 24.77 0.09 0.00 71.50
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
mmcblk0 3.44 91.07 15.14 96231 15997
mmcblk0p1 0.07 0.69 0.00 729 1
mmcblk0p2 3.33 88.41 15.14 93414 15996
|
|
Card |
---|
default | true |
---|
label | After Tiny RDKB |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | CPU Utilization |
---|
| root@RaspberryPi-Gateway:~# iostat
Linux 5.4.72-v7 (RaspberryPi-Gateway) 03/29/21 _armv7l_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
4.02 0.01 21.68 0.03 0.00 74.26
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
mmcblk0 1.33 8.31 10.54 81599 103441
mmcblk0p1 0.01 0.07 0.00 731 1
mmcblk0p2 1.32 8.03 10.54 78780 103440 |
|
|
Deck of Cards |
---|
|
Card |
---|
default | true |
---|
label | Before Tiny RDKB |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | Rootfs Size on Storage Disk |
---|
| root@RaspberryPi-Gateway:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 375.7M 216.1M 136.1M 61% /
devtmpfs 333.7M 0 333.7M 0% /dev
tmpfs 462.2M 4.0K 462.2M 0% /dev/shm
tmpfs 462.2M 9.5M 452.7M 2% /run
tmpfs 462.2M 0 462.2M 0% /sys/fs/cgroup
tmpfs 462.2M 2.8M 459.4M 1% /tmp
tmpfs 462.2M 280.0K 461.9M 0% /var/volatile
/dev/mmcblk0p1 48.5M 27.4M 21.0M 57% /boot
|
|
Card |
---|
default | true |
---|
label | After Tiny RDKB |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | Rootfs Size on Storage Disk |
---|
| root@RaspberryPi-Gateway:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 241.6M 139.5M 85.6M 62% /
devtmpfs 173.0M 0 173.0M 0% /dev
tmpfs 301.5M 4.0K 301.5M 0% /dev/shm
tmpfs 301.5M 21.4M 280.1M 7% /run
tmpfs 301.5M 0 301.5M 0% /sys/fs/cgroup
tmpfs 301.5M 2.5M 299.1M 1% /tmp
tmpfs 301.5M 328.0K 301.2M 0% /var/volatile
/dev/mmcblk0p1 50.8M 29.2M 21.6M 58% /boot
tmpfs 60.3M 0 60.3M 0% /run/user/0 |
|
|
Deck of Cards |
---|
id | RAM Usage, CPU Utilization, Rootfs Size On Storage Disk |
---|
|
Card |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | Rootfs Size On Storage Disk |
---|
| root@RaspberryPi-Gateway:/# uptime
09:23:31 up 10 min, load average: 1.04, 0.74, 0.44
root@RaspberryPi-Gateway:/#
root@RaspberryPi-Gateway:/# ### RAM USAGE ####
root@RaspberryPi-Gateway:/#
root@RaspberryPi-Gateway:/# free -m
total used free shared buff/cache available
Mem: 7573 155 7318 27 100 7253
Swap: 0 0 0
root@RaspberryPi-Gateway:/#
root@RaspberryPi-Gateway:/# ### CPU UTILIZATION ###
root@RaspberryPi-Gateway:/#
root@RaspberryPi-Gateway:/# iostat
Linux 5.15.92-v7l (RaspberryPi-Gateway) 02/26/25 _armv7l_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
4.39 0.02 16.46 0.16 0.00 78.98
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
mmcblk0 7.19 159.24 51.87 107726 35089
mmcblk0p1 0.09 1.07 0.00 726 1
mmcblk0p2 7.03 155.07 51.87 104904 35088
sr0 0.00 0.19 0.00 127 0
root@RaspberryPi-Gateway:/# ### ROOTFS SIZE ###
root@RaspberryPi-Gateway:/#
root@RaspberryPi-Gateway:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 428M 242M 160M 61% /
devtmpfs 3.6G 0 3.6G 0% /dev
tmpfs 3.7G 8.0K 3.7G 1% /dev/shm
tmpfs 1.5G 26M 1.5G 2% /run
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
tmpfs 3.7G 1.7M 3.7G 1% /tmp
tmpfs 3.7G 760K 3.7G 1% /var/volatile
/dev/mmcblk0p1 54M 32M 23M 59% /boot
/nvram/secure_path 428M 242M 160M 61% /nvram/rdkssa
root@RaspberryPi-Gateway:/# |
|
Card |
---|
|
Code Block |
---|
| root@RaspberryPi-Gateway:/# uptime
10:13:17 up 1:00, load average: 0.73, 0.75, 0.77
root@RaspberryPi-Gateway:/#
root@RaspberryPi-Gateway:/#
root@RaspberryPi-Gateway:/# ### RAM USAGE ####
root@RaspberryPi-Gateway:/# free -m
total used free shared buff/cache available
Mem: 7573 160 7303 28 109 7243
Swap: 0 0 0
root@RaspberryPi-Gateway:/#
root@RaspberryPi-Gateway:/# ### ROOTFS SIZE ###
root@RaspberryPi-Gateway:/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 428M 246M 157M 62% /
devtmpfs 3.6G 0 3.6G 0% /dev
tmpfs 3.7G 8.0K 3.7G 1% /dev/shm
tmpfs 1.5G 26M 1.5G 2% /run
tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup
tmpfs 3.7G 1.7M 3.7G 1% /tmp
tmpfs 3.7G 1016K 3.7G 1% /var/volatile
/dev/mmcblk0p1 54M 32M 23M 59% /boot
/nvram/secure_path 428M 246M 157M 62% /nvram/rdkssa
root@RaspberryPi-Gateway:/#
root@RaspberryPi-Gateway:/# ### CPU UTILIZATION ###
root@RaspberryPi-Gateway:/# iostat
Linux 5.15.92-v7l (RaspberryPi-Gateway) 02/26/25 _armv7l_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
3.32 0.03 14.86 0.07 0.00 81.72
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
mmcblk0 2.72 30.11 34.72 109276 125979
mmcblk0p1 0.02 0.20 0.00 726 1
mmcblk0p2 2.69 29.34 34.72 106454 125978
sr0 0.00 0.03 0.00 127 0
root@RaspberryPi-Gateway:/# uptime
10:14:29 up 1:01, load average: 0.98, 0.80, 0.78
root@RaspberryPi-Gateway:/#
|
|
|
Jira |
---|
server | JIRA |
---|
serverId | 11deff04-0380-3a3d-a916-0849d4e573f7 |
---|
key | REFPLTB-916 |
---|
|
https://code.rdkcentral.com/r/q/REFPLTB-916