From: chu@tes-mail.jpl.nasa.gov (Eugene Chu)
To: axp-list@redhat.com
Subject: Re: Alpha Linux Memory size?
Date: Tue, 8 Aug 2000 15:38:24 -0700 (PDT) [thread overview]
Message-ID: <20000808223824.609F56F5D@tes-mail.jpl.nasa.gov> (raw)
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
next reply other threads:[~2000-08-08 22:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-08 22:38 Eugene Chu [this message]
2000-08-09 0:10 ` Alpha Linux Memory size? W Bauske
2000-08-09 1:56 ` Paul Jakma
-- strict thread matches above, loose matches on Subject: below --
2000-08-09 21:29 Eugene Chu
2000-08-10 0:50 ` Paul Jakma
2000-08-08 1:26 Eugene Chu
2000-08-08 1:49 ` Greg Lindahl
2000-08-08 17:38 ` Adam C Powell IV
2000-08-08 18:08 ` Jeff Sturm
2000-08-08 21:26 ` Ross A Knepper
2000-08-08 0:31 Eugene Chu
2000-08-08 0:45 ` Greg Lindahl
2000-08-08 14:07 ` Jay Estabrook
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox