Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


"ulimit -m" - What does this mean?

"ulimit -m" - What does this mean?

"ulimit -m" - What does this mean?

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?


RE: "ulimit -m" - What does this mean?

"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+

RE: "ulimit -m" - What does this mean?

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?

RE: "ulimit -m" - What does this mean?

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)


RE: "ulimit -m" - What does this mean?

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)


RE: "ulimit -m" - What does this mean?


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+

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close