Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"ulimit -m" - What does this mean?

Status
Not open for further replies.

starky5

MIS
Sep 27, 2001
9
US
I'm trying to get a better understanding of what the value of "ulimit -m" means and how it affects processes on an AIX server.

From the man page for ulimit - "Specifies the size of physical memory, in number of K bytes."

If we have the oracle account on one server set to 32768, and ulimited on another, what does this mean? What risk is the unlmited setting exposed to?

Since many of the oracle process consume more than 32k, it doesn't make sense that this is limiting Oracle's memory limit to 32 K bytes.

Can anyone shed some light on this subject?

Thanks..
 
ulimit -m" only shows you the soft limit. Try "ulimit -H -m" and you'll probably find that the hard limit is "unlimited" on both servers.

The risk that the unlimited setting exposes is that a process with a bad memory leak could eventually allocate all virtual memory and cause the system to crash. Since the hard limit is "unlimited" by default, this risk has always been there.

Unless your system is crashing because of full paging space, I wouldn't worry about it.

Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

 
Thanks Rod for the response.

As I understand it, the soft limit (without the -H option) is what will be enforced first since it is lower.

Given this, we have 26 servers the same. Only difference is that two of them have the ulimit -m set to unlimited for the oracle account. One of the two recently crashed because it ran out of paging space with a memory hogging oracle process.

Although I plan to change the ulimit on these servers back to 32768 to be consistent with the others, nobody has been able to explain to me what this number actually means and how it is enforced.

32768 of what? Again, I know that Oracle has processes that consume more than 32k of memory?
 
I have always set ulimit to unlimited for the oracle user

If it is not you will find it difficult (impossible) to create large files (i.e over 2GB)

this is not helpful either, when restoring a crashed database :)

Oracle 10g now has a preinstall check to verify that ulimit is set correctly

The value for memory has to be 2045680 at a minimum (for 10g)

Alex
 
testing this further;

I have the ulimit -m set to 32768, its the hard limit which is unlimited (which is the result of 'ulimit' with no options)

Alex
 
Starky5,

The default soft limit for heap memory is 32768K. All a process needs to do is use the ulimit command or the ulimit() library routine, and it can increase its own soft limit up to, but not beyond, the hard limit.

Given the default hard limit of 'unlimited', any process can run the machine out of memory.

I see two possiblities with regard to your crashed server:

1. Oracle feels free to take all of the memory it wants, and the memory hogging process would have crashed any server, no matter the ulimit setting.

2. Oracle caps its memory use, not at the soft limit, but somehow in relation to the soft limit.

Either way, the solution would be to calculate your total available virtual memory frames ( (real_memory + paging_space) / 4096), determine the highest normal value of AVM in the output of vmstat, subtract the second from the first, and then 'ulimit -Hm ((result * 4) - safe_margin_of_kbytes)'. Obviously, insert the number determined by the formula in place of the formula.

Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top