Operating System - HP-UX
1826081 Members
3241 Online
109690 Solutions
New Discussion

dmesg -Memory Imformation:shows locable 3962816 kb

 
Deepu Chakravarty
Regular Advisor

dmesg -Memory Imformation:shows locable 3962816 kb

dmesg-Memory Information part shows as following:
Physical: 5242880 Kbytes, lockable: 3962816 Kbytes, available: 4559948 Kbytes

My queries are as follows:
1.Why locable show some values ?
2.Can't we use full memory values ?
3.What actually this locable value is?

Thanks.
4 REPLIES 4
Jdamian
Respected Contributor

Re: dmesg -Memory Imformation:shows locable 3962816 kb

I suggesto to read the section called "The Role of Physical Memory" in file /usr/share/doc/mem_mgt.txt

Lockable Memory
---------------

Pages kept in memory for the lifetime of a process by means of a system
call (such as mlock, plock, or shmctl) are termed lockable memory.
Locked memory cannot be paged and processes with locked memory
cannot be deactivated. Typically, locked memory holds frequently
accessed programs or data structures, such as critical sections of
application code. Keeping them memory-resident improves application
performance.

The lockable_mem variable tracks how much memory can be locked.

Available memory is a portion of physical memory, minus the amount of
space required for the kernel and its data structures. The initial value of
lockable_mem is the available memory on the system after boot-up,
minus the value of the system parameter, unlockable_mem.

The value of lockable memory depends on several factors:

* The size of the kernel varies, depending on the number of interface
cards, users, and values of the tunable parameters.

* Available memory varies from system to system.

* The system parameter unlockable_mem is a kernel tunable
parameter. Changing the value of unlockable_mem alters the
default value of lockable_mem also.

HP-UX places no explicit limits on the amount of available memory you
may lock down; instead, HP-UX restricts how much memory cannot be
locked.

Other kernel resources that use memory (such as the dynamic buffer
cache) can cause changes.

* As memory is used, the amount of memory that can be locked
decreases.

* As memory is freed up, the amount of memory that can be locked
increases.

As the amount of memory that has been locked down increases, existing
processes compete for a smaller and smaller pool of usuable memory. If
the number of pages in this remaining pool of memory falls below the
paging threshold called lotsfree, the system will activates its paging
mechanism, by scheduling vhand in an attempt to keep a reasonable
amount of memory free for general system use.

Care must be taken to allow sufficient space for processes to make
forward progress; otherwise, the system is forced into paging and
deactivating processes constantly, to keep a reasonable amount of
memory free.
Sanjeev gupta_2
Frequent Advisor

Re: dmesg -Memory Imformation:shows locable 3962816 kb

Lockable Memory
===============
Physical memory that can be "locked" (that is, its pages kept in memory for the lifetime of a process) by the kernel or plock() is known as lockable memory.
User processes can lock memory using the plock or shmctl system call
Locked memory cannot be paged and processes with locked memory cannot be deactivated. Typically, locked memory holds frequently accessed programs or data structures, such as critical sections of application
code. Keeping them memory-resident improves system performance.
By default, lockable memory can be no more than the system paging threshold.
Available memory is a portion of physical memory, minus
the amount of space required for the kernel and its data structures.
The size of the kernel varies depending on the number of interface
cards, users, and values of the tunable parameters; thus, available
memory varies from system to system.
Lockable memory is extensively used in real-time environments, like
hospitals, where some processes require immediate response and must be
constantly available.
If the default value of lockable memory is changed, care must be taken
to allow sufficient space for paging and deactivation. As the amount
of lockable memory increases, the amount of memory available for
paging and deactivation decreases. The existing processes compete for
a smaller and smaller pool of memory. The system parameter to change
the amount of unlockable memory is unlockable_mem. (See the
/usr/conf/master.d/core-hpux file and System Administration Manager
(SAM) on-line help for information concerning tunable operating-system
parameters.)
During system startup, the system displays on the system console the
amount of its lockable memory (along with available memory and
physical memory). You can display the values later by running
/sbin/dmesg.
lockable_mem = no_of_bytes
lockable_mem is the total amount of physical memory all users can lock
down at once. This value can be changed by modifying the
operating-system parameter, unlockable_mem.
The system has boundary conditions requiring that unlockable_mem be
more than zero and less than the amount of memory available after boot. If unlockable_mem is set to zero or a negative value, the kernel will compute an appropriate default value at boot time.
Available memory minus the memory locked by processes is the memory actually available for virtual memory demand paging.
You can determine the default value of unlockable_mem by subtracting
the amount of lockable memory from the available memory during
boot-up.
available memory - lockable memory = unlockable_mem
For example, the following boot information was displayed on a Model 835:
physical page size = 2 KB
avail mem = 9670656 bytes
real mem = 1677216 bytes
lockable mem = 659456 bytes
The systemâ s unlockable memory would be
9670656 - 659456 = 9011200 bytes
If pseudo-swap reservation (discussed at the end of this paper) is
enabled, it does not allow lockable memory to exceed 3/4 of available
memory on a Series 800 and 7/8 of available memory on a Series 700
system. These limits can be altered using the unlockable_mem
parameter.
Pseudo-swap affects the amount of lockable memory. As the amount of
pseudo-swap used increases, the amount of lockable memory decreas
Kent Ostby
Honored Contributor

Re: dmesg -Memory Imformation:shows locable 3962816 kb

Not all memory can be lockable since you have to have some room to swap things out of memory.

You don't want to have processes be able to lock up all of memory.

"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Deepu Chakravarty
Regular Advisor

Re: dmesg -Memory Imformation:shows locable 3962816 kb

Thanks for all who participated in this forum.