From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JPJVs-0003VE-Sp for garchives@archives.gentoo.org; Wed, 13 Feb 2008 15:27:09 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 30888E0121; Wed, 13 Feb 2008 15:27:07 +0000 (UTC) Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by pigeon.gentoo.org (Postfix) with ESMTP id 17B3BE0121 for ; Wed, 13 Feb 2008 15:27:07 +0000 (UTC) Received: from gw.thefreemanclan.net ([72.81.8.99]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JW6006D3O8VN8Z2@vms044.mailsrvcs.net> for gentoo-amd64@lists.gentoo.org; Wed, 13 Feb 2008 09:26:56 -0600 (CST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by gw.thefreemanclan.net (Postfix) with ESMTP id 4E3F812418F for ; Wed, 13 Feb 2008 10:26:54 -0500 (EST) Date: Wed, 13 Feb 2008 10:26:53 -0500 From: Richard Freeman Subject: Re: [gentoo-amd64] Re: tmpfs help In-reply-to: <200802131346.26316.volker.armin.hemmann@tu-clausthal.de> To: gentoo-amd64@lists.gentoo.org Message-id: <47B30C3D.2080204@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@lists.gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7bit References: <47B17CA6.9000506@corobor.com> <200802131346.26316.volker.armin.hemmann@tu-clausthal.de> User-Agent: Thunderbird 2.0.0.9 (X11/20071116) X-Archives-Salt: 853d476c-2dc5-4d0f-931c-32c7965f7c66 X-Archives-Hash: 7155faf69b3d22923b6a931e180337e1 Volker Armin Hemmann wrote: > On Mittwoch, 13. Februar 2008, Duncan wrote: >>> removed lots of irrelevant 'my hardware is so cool' stuff'. > > You forget some (little) things. Not everything can be swapped out. How is this relevant? Some memory is locked or effectively locked. That limits buffers/cache in the disk-based fs case, and swap in the tmpfs case. I don't see that there is much of a difference. > Swap is > extremly slow AND it is much worse to swapout/swapin programm code that > should be run, instead of fetching some files from disk while the programm > runs. You keep asserting this. Why should fetching a page from swap be slower than fetching the equivalent space from a file? In fact, if mmap is used to read a file the same code probably is used for both. And the kernel is not likely to swap out recently-run program pages. It isn't going to keep a bunch of compiled binaries in memory for 10 minutes while it swaps in and out the compiler - it would swap in and out source files and binary files - just as with a disk-based filesystem. If for some reason part of the compiler is swapped out, it would be rewritten to disk every time it got swapped out - only the first time. I'm sure the kernel would notice that the pages were never written since the last swap and would just flush them from memory without another write. However, this should still only happen on idle pages, and swapping those out is probably better than any other use of memory (and those pages would get swapped out even with a disk-based filesystem in use). I'm of course interested in benchmarks. In theory swap should be faster than files. However, implementation does matter and maybe there is some flaw that makes things slower. My assertion is that a swap-based solution gives the kernel more freedom to optimize memory use than a disk-based solution. So, this should be a fundamentally-superior solution. -- gentoo-amd64@lists.gentoo.org mailing list