raspbian - What uses the memory on raspberry pi? -
on pi after start there no free memory, can not found, waht uses it:
pi@node1 ~ $ cat /proc/cpuinfo processor : 0 model name : armv6-compatible processor rev 7 (v6l) bogomips : 2.00 features : half thumb fastmult vfp edsp java tls cpu implementer : 0x41 cpu architecture: 7 cpu variant : 0x0 cpu part : 0xb76 cpu revision : 7 hardware : bcm2708 revision : 0013 serial : 00000000bf2e5e5c pi@node1 ~ $ uname -a linux node1 4.0.7+ #801 preempt tue jun 30 18:15:24 bst 2015 armv6l gnu/linux pi@node1 ~ $ head -n1 /etc/issue raspbian gnu/linux 7 \n \l pi@node1 ~ $ grep memtotal /proc/meminfo memtotal: 493868 kb pi@node1 ~ $ grep "model name" /proc/cpuinfo model name : armv6-compatible processor rev 7 (v6l) pi@node1 ~ $ ps -eo pmem,pcpu,vsize,pid,cmd | sort -k 1 -nr | head -5 0.6 0.2 6244 2377 -bash 0.3 0.0 6748 2458 sort -k 1 -nr 0.3 0.0 4140 2457 ps -eo pmem,pcpu,vsize,pid,cmd 0.2 0.1 9484 2376 sshd: pi@pts/0 0.2 0.1 5600 2236 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 104:107 pi@node1 ~ $ free total used free shared buffers cached mem: 493868 478364 15504 0 500 4956 -/+ buffers/cache: 472908 20960 swap: 102396 116 102280 i not linux expert, if understand right, there 15mb free memory, no task uses more 0.6%. why not there more free?
memory not exclusively allocated processes.
- the bootloader , init ram filesystem stored in memory.
- the kernel (could big) loaded memory.
- the kernel reserve memory it's processes. ps shows 0.0% these system processes.
- driver allocate buffer memory
- the graphics card needs memory
- if have not configured swap space on harddrive or sd card, uses memory.
- the network system allocates memory unix sockets , shared memory.
- 100 processes 0.1 % 10%.
and, if start process , stop not of memory released. try it. show memory usage free. start process need memory. stop process , use free again. bet there more memory usage before.
edit
here example of pi less memory usage. have no problems running java on it. have wlan dongle , original noir cam installed.
i installed raspbian wheezy. used kernel compiled sources:
> uname -a linux raspberrypi 3.18.14+ #2 preempt sun may 31 20:19:04 utc 2015 armv6l gnu/linux > head -n1 /etc/issue raspbian gnu/linux 7 \n \l on pi can run java -version in acceptable period of time.
time java -version java version "1.8.0" java(tm) se runtime environment (build 1.8.0-b132) java hotspot(tm) client vm (build 25.0-b70, mixed mode) real 0m1.012s user 0m0.800s sys 0m0.190s here memory footprint
> free total used free shared buffers cached mem: 380816 138304 242512 0 8916 96728 -/+ buffers/cache: 32660 348156 swap: 102396 0 102396
Comments
Post a Comment