From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 0AA692F1B1 for ; Tue, 8 Aug 2000 18:38:26 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.8.7/8.8.7) id SAA07969 for axp-list@listman.redhat.com; Tue, 8 Aug 2000 18:38:25 -0400 Received: from tes-mail.jpl.nasa.gov (tes-mail.jpl.nasa.gov [137.78.33.77]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id SAA07964 for ; Tue, 8 Aug 2000 18:38:25 -0400 Received: by tes-mail.jpl.nasa.gov (Postfix, from userid 1001) id 609F56F5D; Tue, 8 Aug 2000 15:38:24 -0700 (PDT) To: axp-list@redhat.com Subject: Re: Alpha Linux Memory size? Message-Id: <20000808223824.609F56F5D@tes-mail.jpl.nasa.gov> Date: Tue, 8 Aug 2000 15:38:24 -0700 (PDT) From: chu@tes-mail.jpl.nasa.gov (Eugene Chu) X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors OK, I think I have a picture. Thanks to the following for their replies: Greg Lindahl Jay Eastbrook Adam Powell Ross Knepper The maximum memory size that Lunix kernel 2.2.x can recognize is 2 GB. With application of the bigmem patch, the kernel can use an unlimited amount of memory. This feature is already in kernel 2.4.x. There are a couple of repositories of patches at: http://www.kernel.org/pub/linux/kernel/people/andrea/patches/ and/or http://www.kernel.org/pub/linux/kernel/people/andrea/kernels/ which must contain the bigmem patches. My second question concerned swapping or thrashing when an application starts to use up all the physical memory in the system, and still needs to do disk I/O. With the file system cache that ordinarily takes up whatever unused memory there is in the system, the performance of such a program can become unpredictable as it fights with the UBC for memory (or rather, when it needs memory, and cached data must be flushed). The mlock function seems like a good way to make sure that the application has all the memory it needs, just as long as it does not attempt to lock down so much memory that the rest of the system can no longer do anything. The other possibility is to mmap the files and use the VM management features of the operating system (and maybe hardware) to access the files as arrays within the program. There are two problems with this. First, if the system is memory bound already, there is precious little memory remaining to let the OS do its thing. Second, the VM system usually has no idea how you want to access your data, so it can not optimally swap the pieces of the data for you. (Exactly like caching; the CPU caches only work with prescribed algorithms, and if the way your program accesses data is not consistent with the way the CPU cache works, your data access speed will be down to memory speed.) Many papers have been written on this subject, including how to provide hints to the VM using the madvise function. To alleviate the problem of insufficient physical memory, we are attempting to do our own memory management using large files. Since we know exactly how our program uses its data, we can use separate threads to perform write-behinds or read-aheads to keep data not currently used on disk. But the bugger here is that file I/O uses file system cache, and CPU cycles to copy between user space and file system cache. So, we're looking into using raw partitions as our disk buffers. At least on Solaris, I/O to raw disk partitions seems to require no system buffering whatsoever, so no memory is being used, and no CPU cycles are wasted in copying between user space and system cache. thanks again for all the inputs, and further comments are welcome. eugene