From: jh...@datamap.mn.org (Jim Hall)
Subject: Q: How much mem can Linux address?
organization: DataMap Inc.
My company is considering adopting Linux as a test bed for one of its
software projects. But this project sucks up LOTS of memory. Just
over 1 Gb of memory, to be precise.
I looked at "limit" under csh and "ulimit" under bash, and the
addressable data size seems to be set to "unlimited." I'm guessing
this was set this way to avoid imposing an arbitrary limit on GNU's
So, how much memory can the Linux kernel address? Let's get really
ambitious and compare this to our Sun server: Can Linux address as
much as 2 Gb of memory (for a SINGLE process)?
Please post, as mail is broken right now.
James Hall, systems administrator || phone: 612-934-0900
email: jh...@datamap.mn.org || fax: 612-934-8727
Vista Information Solutions || 7525 Mitchell Road
(formerly DataMap) || Eden Prairie, MN 55344
From: torva...@cc.Helsinki.FI (Linus Torvalds)
Subject: Re: Q: How much mem can Linux address?
content-type: text/plain; charset=ISO-8859-1
organization: University of Helsinki
In article <JHALL.95Aug11175...@mutt.datamap.mn.org>,
Jim Hall <jh...@datamap.mn.org> wrote:
>My company is considering adopting Linux as a test bed for one of its
>software projects. But this project sucks up LOTS of memory. Just
>over 1 Gb of memory, to be precise.
>I looked at "limit" under csh and "ulimit" under bash, and the
>addressable data size seems to be set to "unlimited." I'm guessing
>this was set this way to avoid imposing an arbitrary limit on GNU's
>So, how much memory can the Linux kernel address? Let's get really
>ambitious and compare this to our Sun server: Can Linux address as
>much as 2 Gb of memory (for a SINGLE process)?
On a x86 platform, linux can use up to 1GB (slightly less, actually) of
real RAM. I haven't tested this, though, so if you want to make sure,
half a gig should be pretty safe. And yes, a single process can get
just about all of the physical ram (minus kernel data and so on).
Somehow I don't think you meant physical RAM, though. I think most PC
motherboards will max out at 64-256MB of RAM anyway..
Virtually, you shouldn't have problems if it runs on Suns. Linux gives
each process a 3GB address space, and you're free to do with that as you
want, no restrictions. If you want to use a.out shared libraries, you
usually load them at around the 1.5GB mark or so, and then you obviously
will need to have a stack, so without any tweaking you'll be limited to
something in the 1.5GB range.
With minor tweaking (adding the "-static" flag when compiling and being
careful about using mmap() and brk() together) you'll get the full 3GB
address space (minus stack).
Swap space is limited to about 2GB, though, so if you actually have a
large working set (not just need of a large virtual memory area), you
could have some problems.
If you want more, the linux/axp kernel will let you use just about as
much memory as you can (generally limited by the motherboard, but with a
theoretical perfect motherboard and lots of money you should be able to
cram up to something like 16GB of memory to a 21064 chip). Virtually,
you'd get 41 bits of user address space. "Enough".
Oh, and on an alpha, the swap space limit also goes up to 8GB due to the
larger page-size. And you _can_ actually increase the swap space limit
with a simple recompile of the kernel (by about one order of magnitude).