1833178 Members
2970 Online
110051 Solutions
New Discussion

Memroy use

 
SOLVED
Go to solution
hector hernandez
Occasional Advisor

Memroy use

Are there any parameters of kernel that limit the amount of memory used by a process?
7 REPLIES 7
Sundar_7
Honored Contributor
Solution

Re: Memroy use

Sure. Any binary executed has 3 segments = Data,stack and text segments.

You have 3 kernel parameters that limit the size of these 3 segments.

maxdsiz = maximum data segment size for a 32-bit binary
maxdsiz_64bit =Max data seg size for a 64-bit binary

maxssiz - max stack seg size for a 32-bit binary
maxssiz_64bit = for 64 bit binary

maxtsiz = max text seg size for a 32 bit binary
maxtsiz_64bit = max text seg size for a 64 bit binary.

Any process that tries to allocate more than above boundaries will be terminated.
Learn What to do ,How to do and more importantly When to do ?
Sridhar Bhaskarla
Honored Contributor

Re: Memroy use

Hi,

Another interesting segment is shared segment.. One can create a segment of size upto shmmax kernel parameter.. and can create multiple such segments upto msgmni parameter depending on the OS bit version. With default configuration, such limitation is upto 1.75 GB on a 32 bit OS and 1 TB on 64bit. So, there isn't enough contiguous space available in the shared memory space, then the processes that create shared memory will fail.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
hector hernandez
Occasional Advisor

Re: Memroy use

Hi

I know that if the shared memory gets full or if there is any problem for the kernel to assign a segment, there will be a message in the syslog.log file. What about the other memory areas (data segment, stack segment, text segment) ? Do they produce a message in the syslog.log files as well ?

Thanks in advance.

Hector
Sundar_7
Honored Contributor

Re: Memroy use

hmm..I dont know for sure..

but I know you will get messages similar to

"Bus fault"

"Segmentation voilation fault"

I dont believe these messages get logged in syslog.log.
Learn What to do ,How to do and more importantly When to do ?
Sridhar Bhaskarla
Honored Contributor

Re: Memroy use

Hi,

Even for the shared memory, you will hardly find any errors in syslog.log. The kernel tables such as nfile, nproc will give out the errors in syslog.log

Most of the memory overflow errors are given out as the standard errors by the processes. Such as 'segment violation', 'out of memory' etc.,

Also, note that on HP systems are based on virtual memory. So, on a system you may find only 512 MB of physical memory but still you can be able to create 600 MB of data segment. Having said that there is another parameter that can limit the memory usage 'swap space'. You may have 10 GB of physical memory on the system but if you haven't configured your swap space enough, you may not be able to use all the memory.

A small correction in my previous note.. A typical shared memory quadrant size on 64-bit systems is 4 TB.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ted Buis
Honored Contributor

Re: Memroy use

The problem with using kernel parameter to limit usage by processes, is that they refer to virtual memory space, and that processes die when one of these limits is exceeded. I think what you likely want is to restrict the use of physical memory so that it is allocated the way you wish. This can be done with Process Resource Manager or Workload manager. PRM is an option software product, but is included in the Enterprise Operating Environment for 11i. WLM, which includes PRM, can also be ordered separate or is included in the Mission Critical Operating environment for 11i.
Mom 6
Prashant Zanwar_4
Respected Contributor

Re: Memroy use

I have seen message similar to "Oracle is trying to use memory out of the shared memory area. "
Hope this helps
Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."