1、SONiCon a management or access switchSONiCLite:How to fit SONiCinto a small boxIT Ecosystem:NetworkingSONiCLite:How to fit SONiCinto a small boxTaras Chornyi,Solutions Architect,PLVisionAndriy Kokhan,Solutions Architect,PLVisionA typical SONiCplatformIntel Xeon-D CPUup to 16G of RAMup to 256Gb stora
2、geup to 128x100G portsruns SONiC48x1G+4x10G or 4x25GARM/MIPS/x86up 2G RAMup to 4G of storagecan run SONiC?A typical access/management switchsonic-vs VM as DUTcodebase master fffeec6eccdefault build from AzureVM resources2CPU 2GB RAMHow SONiCutilizes resourcesTools used:systemd-bootchartperftopsmempa
3、rse.py the script which parses bootchart svg and showshow often each process wascalled and howmany calls utilizedmore than 50%of CPUThe idea is to check and optimize the common SONiC partVendor-specific parts can be quite heavy for CPU/storage/RAMEvaluation must be done for specific platforms/vendor
4、sWhat about a vendor-specific part?1.Idle the system is up and running for 3min.All servicesare fully initialized.2.Config reload issue config reload ywhen the system is in idlestate.3.Show the system in idle state,show command issued in the loop 1 iteration/s.States analyzedrootsonic-1:/home/admin#
5、smem-a-k-t-wAreaUsedCache Noncachekernel dynamic memory538.8M155.0M383.8Muserspace memory1.3G87.0M1.2Gfree memory92.2M92.2M0-1.9G334.1M1.6GSONiCRAMusageSONiCRAM usageDuring the config reload the most visible impact is caused by:sonic-cfggen called 30 times.In 19/30 runs,CPU utilization exceeded 50%P
6、ython3 applications called 147 times.In 34/147 runs,CPU utilizationexceeded 50%CPU usage(reload)Move Python imports from the file scope to the function scopeDisable system-health service or refactor healthd implementationCheck for possible command-specific improvementsUp to 2 times faster executionS