How to increase the available memory?

Submitted by sudip06
on November 7, 2005 - 2:36am

Hi Everybody,
I am working on montavista linux kernel 2.4.20, on broadcom chipset(bcm4704), mips processor...having 32Mb RAM..out of which top 2Mb has been given for DMA access..remaining 30Mb should be available. But in cat /proc/meminfo it only shows 26Mb free, in dmesg..it shows that 4.7Mb is reserved for kernel. That is far too much that i expect as I have heard it ahuld not be more than 2-3% of total memory(which shud be arnd 0.9Mb max in our case). How to reduce it? I am having busybox utilities.
here is the output:
cat /proc/meminfo

total: used: free: shared: buffers: cached:
Mem: 27181056 7303168 19877888 0 53248 5435392
Swap: 0 0 0
MemTotal: 26544 kB
MemFree: 19412 kB
MemShared: 0 kB
Buffers: 52 kB
Cached: 5308 kB
SwapCached: 0 kB
Active: 720 kB
Inactive: 4984 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 26544 kB
LowFree: 19412 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Committed_AS: 1056 kB
VmallocTotal: 1048560 kB
VmallocUsed: 448 kB
VmallocChunk: 1048112 kB

dmesg|grep [Mm]em

Setting memory region to 0x2000000
Environment [0] :
5200 mem=30M ramdisk_size=8192 nfsroot=10.240.4.61:/home/canoop/target
U-BOOT Environment: bootargs = root=/dev/ram console=ttyS0,115200 mem=30M
memory: 02000000 @ 00000000 (usable)
memory: 01e00000 @ 00000000 (usable)
Kernel command line: yroot=/dev/ra console=ttyS0,115200 mem=30M
Memory: 25996k/30720k available (1474k kernel code, 4724k reserved, 92k data, 80k init, 0k
highmem)
Disabling the Out Of Memory Killer
Freeing initrd memory: 466k freed
Freeing unused kernel memory: 80k freed

Theres also another instance where dmesg doent show reserved space for kernel. So, I am wondering without this reserved space, it can work.....I have to reduce the memory by 1-2Mb. Any suggestions?

Can I reduce the buffer cache, right now its almost 5.4Mb..Is it required to increase available memory? I personally dont feel so, as I think the buffer cache is reduced as memory need arises. Pls correct me if I am wrong.

/*What my suspicion is: Does Montavista linux has some limitation abt the minimum reserved space?*/

what are the other ways of increasing the available memory?

Thanks,
sudip

selenic.com/linux-tiny/ may h

on
November 7, 2005 - 5:49am

selenic.com/linux-tiny/ may help. The kernel you have does't seem to be particulary small. Sure that everything that isn't really needed is disabled?

Are you sure that booting with mem=30M is needed? The 2-3% is probably measured with more ram available.

Buffer cache will be freed when memory is needed.

The kernel uses about 5 Mb now, what's using the other 21?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.