From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q5uHn-0004g7-Vz for garchives@archives.gentoo.org; Sat, 02 Apr 2011 06:26:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B9BD81C06E; Sat, 2 Apr 2011 06:24:45 +0000 (UTC) Received: from svr-us4.tirtonadi.com (unknown [69.65.43.212]) by pigeon.gentoo.org (Postfix) with ESMTP id 90AFE1C06E for ; Sat, 2 Apr 2011 06:24:45 +0000 (UTC) Received: from mail-iy0-f181.google.com ([209.85.210.181]) by svr-us4.tirtonadi.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.69) (envelope-from ) id 1Q5uGM-0003NH-Ky for gentoo-user@lists.gentoo.org; Sat, 02 Apr 2011 13:24:46 +0700 Received: by iyb26 with SMTP id 26so5316545iyb.40 for ; Fri, 01 Apr 2011 23:24:42 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.43.55.83 with SMTP id vx19mr7251742icb.24.1301725482504; Fri, 01 Apr 2011 23:24:42 -0700 (PDT) Received: by 10.42.167.7 with HTTP; Fri, 1 Apr 2011 23:24:42 -0700 (PDT) In-Reply-To: <1301689709.145877.12.camel@victoria> References: <1301684371.55806.3.camel@victoria> <1301689709.145877.12.camel@victoria> Date: Sat, 2 Apr 2011 13:24:42 +0700 Message-ID: Subject: Re: [gentoo-user] Re: How low can you go? From: Pandu Poluan To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - svr-us4.tirtonadi.com X-AntiAbuse: Original Domain - lists.gentoo.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - poluan.info X-Archives-Salt: X-Archives-Hash: 489f1331638cf5771a73da8debfded3f On Sat, Apr 2, 2011 at 03:28, Albert Hopkins wrote= : > On Sat, 2011-04-02 at 02:22 +0700, Pandu Poluan wrote: >> Good grief! How'd you do that?! >> >> *bow in respect* >> >> Rgds, >> >> > > Well, firstly, I managed to get it down to 3MB (though I cheated *a > little*): > > lilpenguin ~ # sync ; echo 3 > /proc/sys/vm/drop_caches # kinda cheating > lilpenguin ~ # free -m > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 total =C2=A0 =C2=A0 =C2=A0 used= =C2=A0 =C2=A0 =C2=A0 free =C2=A0 =C2=A0 shared =C2=A0 =C2=A0buffers > cached > Mem: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A043 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A05 =C2=A0 =C2=A0 =C2=A0 =C2=A0 37 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A00 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 > 1 > -/+ buffers/cache: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A03 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 39 > Swap: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A00 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00 > lilpenguin ~ # uname -srm > Linux 2.6.36-gentoo-r8 x86_64 > lilpenguin ~ # df -h > Filesystem =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Size =C2=A0Used Avail= Use% Mounted on > /dev/vda1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 4.0G =C2=A0157M =C2= =A03.6G =C2=A0 5% / > shm =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= 22M =C2=A0 =C2=A0 0 =C2=A0 22M =C2=A0 0% /dev/shm > > > So what it is is this: > > * kvm with virtio devices > * no udev (static /dev) > * serial console only > * no services in default runlevel > * tight module-less virtio-based kernel (booted externally) > * no extra (virtual) hardware > * everything compiled with -Os > Unfortunately, I can't go module-less; xtables-addons requires modules supp= ort. How do you get static /dev ? > I could probably get it lower by tweaking the kernel a bit more. =C2=A0Al= so > it would probably use slightly less RAM if it were 32-bit. =C2=A0Also, th= e > biggest user of memory are /bin/bash and /bin/login. =C2=A0I could minimi= ze > memory further by making the login shell ash or dash. > I also rely on lots of bash scripts. *sigh* ... I'll never get it as small as yours... but still I *am* interested in your memory-saving tricks :-) Rgds, -- Pandu E Poluan ~ IT Optimizer ~ Visit my Blog: http://pepoluan.posterous.com