From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.54) id 1FCH5W-0004zj-Ht for garchives@archives.gentoo.org; Thu, 23 Feb 2006 14:04:58 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.5/8.13.5) with SMTP id k1NE3r4b014608; Thu, 23 Feb 2006 14:03:53 GMT Received: from smtp1.iway.na (smtp1.iway.na [196.44.136.15]) by robin.gentoo.org (8.13.5/8.13.5) with ESMTP id k1NDx0KO026146 for ; Thu, 23 Feb 2006 13:59:02 GMT Received: from vscan.iway.na ([196.44.136.13]) by smtp1.iway.na (Netscape Messaging Server 4.15) with ESMTP id IV586A03.97A for ; Thu, 23 Feb 2006 15:58:58 +0200 Received: from mx2.iway.na (localhost [127.0.0.1]) by vscan.iway.na (Postfix) with ESMTP id A580E14A37 for ; Thu, 23 Feb 2006 15:58:57 +0200 (WAST) Received: from uwix.alt.na ([196.44.156.187]) by mx2.iway.na (Netscape Messaging Server 4.15) with ESMTP id IV586900.60D for ; Thu, 23 Feb 2006 15:58:57 +0200 Received: from uwe by uwix.alt.na with local (Exim 4.60) (envelope-from ) id 1FCGwA-0001yu-HO for gentoo-user@lists.gentoo.org; Thu, 23 Feb 2006 15:55:18 +0200 From: Uwe Thiem Organization: SysEx (Pty) Ltd. To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] How many GB for / partition? Date: Thu, 23 Feb 2006 15:55:18 +0200 User-Agent: KMail/1.9.1 References: <28958.1140696299@www077.gmx.net> In-Reply-To: <28958.1140696299@www077.gmx.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602231555.18509.uwix@iway.na> Sender: Uwe Thiem X-Archives-Salt: 68a1466a-e737-4814-834a-2e79b9b177d5 X-Archives-Hash: 75bbea2f899b27e518bae089490ec3d8 On 23 February 2006 14:04, jarry@gmx.net wrote: > "joaoemanuel1981" wrote: > > Do i not understand why needs swap, if have 1GB of RAM? > > 1. because if you have 200GB disk, cutting 1 or 2GB for swap does not > matter True. > > 2. because someone told me some apps want to allocate swap no matter how > ram you have (I think it was someone from hp-ux support, but I'm not sure > if this is true for linux) This is a myth. *No* application (under linux) can grab swap space directly. Applications ask the kernel for memory when they allocate it. The kernel, based on algorithms that balance free real ram, buffers and cache, returns either real ram as memory to the app or - if it is low on real ram - swap space. So what you do when adding swap space is extending your (fast) real ram with (slow) memory residing on your harddrive. > > 3. because it is always better to have too much ram/swap then too little Nnnnot always. There are circumstances when you do not want swap at all. Consider a box that has certain real time response requirements which cannot be met if apps are swapped out (actually parts of their code and/or data paged out) to the harddrive. In these cases, you do not want swap but enough ram to accommodate your running processes at all times. This and 2. also mean that it's quite pointless to add swap if your workstation has 16GB of ram and isn't used for image processing or other extremely memory-hungry tasks. > > 4. because if you do not set up swap, but need it later, it will not be so > easy to create it, if you partition all disk and leave no space left The times when we couldn't resize partitions under linux without holding our breath are over. > > 5. because it is a good *nix habit! :-) What does or does not constitute good *nix habits is at least debateable. If I needed a box that was fast at all times and (logical AND) money was of no concern I'd put real ram in until the bugger stopped using swap space and forget about swap. Since I do have to take monetary issues into consideration, I rather configure some (cheap and slow) swap and have less (expensive, compared to harddrive space, and fast) ram. How much ram and how much swap is an economic question. It all boils down to how and what for you use your box. If you need more memory than you have ram, are you willing to invest the money for more ram? No? Then you need swap. There are too damn many myths about swap out there. Like this one: Always configure twice as much swap as you have ram. Why? Why would I need more swap if I increased my ram? You need at least a little bit of swap for peak memory usage. Let's look at real numbers. Say, I am a bit low of ram for today's computers. I have 256MB ram. For peak usage, I add 128MB swap. I open so many applications/documents that the box starts swapping out 20MB. Sure, without swap space, I wouldn't have been able to open the last document. But nothing makes me stop there. I can as well run out of swap. If you have 2GB of ram and 2GB of swap your total available memory is 4GB. If you need more you have to add either ram or swap. What you add is your choice based on your needs for speed and the money you are willing to spend on memory. That's it. End of rant. Uwe -- Why do consumers keep buying products they will live to curse? -- gentoo-user@gentoo.org mailing list