HI all,
My developing device only have 128M Ram and 128M NAND, which is mips cpu with uClibc library.
-
If I try to use failsafe mode to check system status, looks like 100% cpu usage problem is gone.
-
If I try to use normal mode to check system status(switch_root), looks like doing anything would cause 100% cpu usage. For example, if I try to connect webUI from nginx. Check top, kworker and nginx will occupy a lot of cpu resource.
Mem: 21264K used, 88532K free, 132K shrd, 1196K buff, 2220K cached
CPU: 2% usr 97% sys 0% nic 0% idle 0% io 0% irq 0% sirq
Load average: 3.49 1.03 0.36 2/66 999
PID PPID USER STAT VSZ %VSZ %CPU COMMAND
746 1 root S 10216 9% 19% nginx: master process /usr/sbin/nginx
4 2 root SW 0 0% 19% [kworker/0:0]
- From top, we know we have about 88M free memory, but if I copy about 50MB into tmp(we don't limit the size of tmp), the kernel will show up OOM-Kill.
root@OpenWrt:/# mount
/dev/root on /rom type squashfs (ro,relatime)
devtmpfs on /rom/dev type devtmpfs (rw,relatime,size=21516k,nr_inodes=5379,mode=755)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_0 on /overlay type ubifs (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
/dev/mtdblock5 on /etc/factory type ext4 (ro,noatime,data=ordered)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
Looks like tmpfs and switch_root are clues to debug, but
does anyone have experiences similar my situation?
Please help. Thanks a lot.