Looking for some memory advice on an OpenWRT system.

I have a SKW71 module (ar9331 cpu). It has 16Mb flash and 512Mb ddr2 RAM. Images for that system do not exist. Therefore I have installed an OpenWRT image normally for the WR703N (4Mb flash, 32Mb RAM). All seem to work pretty well. Although I realise I might have to built a dedicated image at some point.

For now I would like to verify if the operating system is using all the hardware resources available.

From the mtd partitioning I can see the flash is being entirely used. See commands below. I do get art + firmware + u-boot totalling 16Mb. Fine.

I have more wonders about the RAM. This page states that the /tmp is up to 50% the ram size. However according to the df command I only reach around 30Mb. This is far from the 256Mb I would expect.

How do I check how my RAM is allocated and used?

Should I be able to claim more memory for my /tmp?

If so how can I alter this?

Some of the commands below. df / mtd / meminfo

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                   12.6M    812.0K     11.8M   6% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    29.9M    152.0K     29.7M   0% /tmp
/dev/mtdblock3           12.6M    812.0K     11.8M   6% /overlay
overlayfs:/overlay       12.6M    812.0K     11.8M   6% /
tmpfs                   512.0K         0    512.0K   0% /dev

root@OpenWrt:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 0010c4d0 00010000 "kernel"
mtd2: 00ec3b30 00010000 "rootfs"
mtd3: 00c90000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 00fd0000 00010000 "firmware"

root@OpenWrt:~# cat /proc/meminfo | head
MemTotal:          61228 kB
MemFree:           41472 kB
MemAvailable:      47576 kB
Buffers:            1880 kB
Cached:             6224 kB
SwapCached:            0 kB
Active:             6172 kB
Inactive:           3948 kB
Active(anon):       2120 kB
Inactive(anon):       48 kB

EDIT 7 Month later. Still looking for a solution for this. I went into uboot and can clearly see it using 64MB Ram. Looks like this would be the way to investigate now.

  BOARD: TP-Link TL-WR703N v1
    SOC: AR9330 rev. 1
    CPU: MIPS 24Kc
    RAM: 64 MB DDR2 16-bit CL3-4-4-10
  FLASH: 16 MB Winbond W25Q128
    MAC: 28:A1:EB:FD:1A:FF
         400/400/200/ 25/ 25 MHz

From your meminfo, MemTotal is 61228kB, only 64kB are recognized by the OpenWRT. I suspect that 64kB are somewhat coded and the RAM is not scanned.

| improve this answer | |
  • Thank you for your input. Do you mean 64mB rather than 64kB? – Noel Sep 14 '18 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.