Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine the process memory limit in Linux?

I have been scouring the internet to find out how much memory a java process can take on a linux (red-hat) machine. ( I am not talking about heap; rather, the entire amount of memory taken up by the java Process)

I don't have permission to execute anything on that machine. So I can't simply execute a program that consumes memory until Out-Of-Memory condition.

However, I do have permission to check config files, etc. ( for example: I tried to execute cat /proc/meminfo, but I can't understand it; it appears that none of its results stand for the parameter I want to know about).

I have tried out a java program on a separate red hat machine - on which I do have permission to execute programs - and I was able to see java program grow up to around 3GB.

Is there some way I can find out how much memory a process can get ?

like image 245
rk2010 Avatar asked Jan 10 '11 20:01

rk2010


People also ask

What is memory limit in Linux?

e.g. A Suse 2.4. 20 Linux system restricts the maximum size of a shared memory segment to 32 MBytes (the on-line documentation says the limit is 4 MBytes !) This limit must be changed if large arrays are to used in shared memory segments.

How much memory can a process use?

A process lives within a 4GB virtual address space. The limit mirrors that of a 32-bit pointer and is deemed 'virtual' because the address pointer does not refer to physical memory but is actually a logical address.


1 Answers

ulimit is your friend. Java processes are no different than any others. But if you can't even run ulimit -a, it's hard to answer your question.

like image 148
bmargulies Avatar answered Oct 04 '22 19:10

bmargulies