LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   How can I get the "Per process memory limitation" for 64-bit system? (https://www.linuxquestions.org/questions/linux-kernel-70/how-can-i-get-the-per-process-memory-limitation-for-64-bit-system-707431/)

kauuttt 02-25-2009 08:37 AM

How can I get the "Per process memory limitation" for 64-bit system?
 
I have a 64 bit system.
How can I get the "Per process memory limitation" for my system.

Any commands or files to look at ?

thanks-kd

johnsfine 02-25-2009 08:51 AM

What do you mean by "Per process memory limitation" and/or what do you want that information for.

I don't think there is any meaning for that phase that has any practical significance.

In a typical 32 bit Linux, each process is limited to 3GB of virtual address space. When you figure in the memory mapping of the executable and shared objects, plus demand zero and other forms of address space that might not get backed at all while the task runs, plus the swap area etc., 3GB is a meaningful limit even on systems with far less than 3GB of physical ram (that 3GB limit might prevent some application that without a 3GB virtual limit might run just fine in a fraction that much physical ram).

In a 64 bit Linux system, any theoretical hard limit on per process virtual address space is far above any practical level. Some system wide limit on total amount of mapping capacity or commit level or backing store or something will stop you before you reach any theoretical limit on per process virtual memory.

kauuttt 02-25-2009 08:57 AM

As u mentioned, that in 32 bit system each process is limited to 3GB of virtual address space. What is the same for 64 bit?

From where I can check this info (3 Gb or something else)?
can u pls tell me where/how u checked in 32 bit system...I can do the same for 64 bit.

johnsfine 02-25-2009 09:45 AM

I don't know where you can check it on a specific Linux system. I just know that 3GB is typical and is the value on every 32 bit Linux I use. I'm pretty sure it can and sometimes is adjusted as a build time option.

32 bit mode has a 4GB limit per process (including kernel) in the hardware architecture. An OS design must divide that between kernel and process. Windows by default divides it 2GB/2GB but can be set to divide it 1GB/3GB. Linux typically divides it 1GB/3GB, but can be set to 2GB/2GB or to (inefficiently elsewhere)/4GB.

The current hardware architecture for 64 bit has a limit (per process including kernel virtual) of 262144GB, and is designed to make an even division between Kernel and process most practical. So an OS could easily have a limit of 131072GB virtual for each process.

However, there are some performance advantages to designing the OS with a lower limit on per process virtual memory. I think I read somewhere that XP64 set that to 320768GB per process virtual. I think there would be a significant simplification and performance advantage at a limit of 1024GB process virtual (but that would actually constrain some plausible uses, so it wouldn't be a good idea). I don't recall what if anything I've ever read about what Linux has done for that.

People asking these impractical questions are usually referred to
http://linux-mm.org/LinuxMM
as an introduction to where you might look to find it yourself. Just now, I followed a few links there to see if your answer was given. I didn't find it.

BTW, the x86_64 architecture (unlike the 32bit architecture) is designed to allow a future expansion far beyond 262144GB involving a change to both CPU chip design and OS kernel source code, but NOT requiring any user code to be changed nor even recompiled.

kauuttt 02-26-2009 08:50 AM

Thanks Johnsfine for your suggestions!!!
any others suggestions??


All times are GMT -5. The time now is 02:30 AM.