1 |
On Thursday 17 January 2013 05:43:09 Kfir Lavi wrote: |
2 |
> I just killed some processes and arrived to bare system 64MB. |
3 |
> Now just sshd, bash and agetty are showing in ps aux as real processes. |
4 |
> The other are kernel processes. |
5 |
> The kernel is pretty lean. Should I expect 64MB as the initial system |
6 |
> memory use? |
7 |
> Can I lower it? |
8 |
|
9 |
you have to look at where exactly memory is being used |
10 |
|
11 |
when the kernel boots, it very clearly tells you what it is using as a |
12 |
starting point. in dmesg, look for the line starting with "Available:". |
13 |
|
14 |
from there, run `ps auxOR`. the VSZ/RSS fields will tell you how much memory |
15 |
each process is using (be aware that some of it is shared e.g. glibc shared |
16 |
libs). |
17 |
|
18 |
then look at /proc/meminfo and see what is being used where. |
19 |
|
20 |
i'm assuming your system is booting off a real rootfs (e.g. not an initramfs) |
21 |
so usage there shouldn't be a big problem. |
22 |
|
23 |
with that information, you can see what can be shrunk or what is unavoidable. |
24 |
|
25 |
FWIW, i built Blackfin systems w/16MiB of RAM fairly easily. but those used |
26 |
uClibc and busybox (and dropbear for ssh). while much of userland was built |
27 |
with -Os, the kernel and uClibc were built with -O2 as the space/optimization |
28 |
tradeoffs didn't seem worth it. |
29 |
-mike |