Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've got a RHEL4 machine with 1TB of memory and have discovered that malloc and mmap refuse to allocate any memory above 512GB. Meanwhile, I don't seem to have a problem with RHEL5 machines. I'm presuming, then, that it's just a matter of kernel configuration. Does anyone know what controls the maximum process size (assuming a fixed page size)?

share|improve this question

migrated from superuser.com Dec 6 '12 at 16:31

This question came from our site for computer enthusiasts and power users.

    
RHEL4 is a few years old now... perhaps older versions cannot go this high –  Simon Sheehan Dec 5 '12 at 20:34
    
Also 1TB is a lot of memory.. –  Simon Sheehan Dec 5 '12 at 20:35
    
Yes it is but our domain requires it. And yes 1TB is a lot of memory. Actually, we'll probably need up to 4TB soon. –  balor123 Dec 5 '12 at 20:36
    
Is all the memory recognized by the hardware (say in the BIOS)? Exactly which version/update level is your RHEL4 at? Which kernel are you using? –  techie007 Dec 5 '12 at 20:46
2  
There are certain limits for code, data and stack segments. You can view them with ulimit -a and change them up to another limit. After that you need at least recompile the kernel, maybe some libs too. –  ott-- Dec 5 '12 at 20:49
show 3 more comments

1 Answer 1

up vote 1 down vote accepted

The initial port of Linux for amd64 only supported a 40-bit virtual address space, divided in 512GB for the process and 512GB for the kernel. Current versions support 48 bits of virtual address space, divided in 128TB/128TB. This last limitation is intrinsic in the current version of the amd64 architecture: there is simply no way to configure the MMU to make more bits significant. See How does Linux support more than 512GB of virtual address range in x86-64? for an explanation of the amd64 MMU, or the AMD64 Architecture Programmer's Manual (§5.1) for the full story.

I don't know exactly when this limitation changed, but your 2.6.9 kernel is really old. Red Hat publishes a table of features and limits for RHEL 3 through RHEL 6. The maximum per-process address space on RHEL4 is 512GB. RHEL5 will get you 2TB, but you might want to upgrade directly to RHEL6 which supports the full 128TB.

share|improve this answer
    
From the doc, looks like it changed in 2.6.11. –  balor123 Dec 6 '12 at 22:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.