Gentoo Archives: gentoo-user

From: Albert Hopkins <marduk@×××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: How low can you go?
Date: Fri, 01 Apr 2011 20:30:07
Message-Id: 1301689709.145877.12.camel@victoria
In Reply to: [gentoo-user] Re: How low can you go? by Pandu Poluan
1 On Sat, 2011-04-02 at 02:22 +0700, Pandu Poluan wrote:
2 > Good grief! How'd you do that?!
3 >
4 > *bow in respect*
5 >
6 > Rgds,
7 >
8 >
9
10 Well, firstly, I managed to get it down to 3MB (though I cheated *a
11 little*):
12
13 lilpenguin ~ # sync ; echo 3 > /proc/sys/vm/drop_caches # kinda cheating
14 lilpenguin ~ # free -m
15 total used free shared buffers
16 cached
17 Mem: 43 5 37 0 0
18 1
19 -/+ buffers/cache: 3 39
20 Swap: 0 0 0
21 lilpenguin ~ # uname -srm
22 Linux 2.6.36-gentoo-r8 x86_64
23 lilpenguin ~ # df -h
24 Filesystem Size Used Avail Use% Mounted on
25 /dev/vda1 4.0G 157M 3.6G 5% /
26 shm 22M 0 22M 0% /dev/shm
27
28
29 So what it is is this:
30
31 * kvm with virtio devices
32 * no udev (static /dev)
33 * serial console only
34 * no services in default runlevel
35 * tight module-less virtio-based kernel (booted externally)
36 * no extra (virtual) hardware
37 * everything compiled with -Os
38
39 I got the disk space down low by removing everything not needed to boot
40 and get into the system (which means the portage tree, compiler, etc),
41 but that has nothing to do with the memory usage.
42
43 I could probably get it lower by tweaking the kernel a bit more. Also
44 it would probably use slightly less RAM if it were 32-bit. Also, the
45 biggest user of memory are /bin/bash and /bin/login. I could minimize
46 memory further by making the login shell ash or dash.

Replies

Subject Author
Re: [gentoo-user] Re: How low can you go? Albert Hopkins <marduk@×××××××××××.org>
Re: [gentoo-user] Re: How low can you go? Pandu Poluan <pandu@××××××.info>