Back to the original question (locked-shm-memory on servers):

If you are running multiple applications on a server, and at least one
of them uses shared memory, you should consider using max-shm-memory
or max-locked-memory for the zone that will use shared memory.

Any memory that a process locks down cannot be paged out. That helps
performance of the application, but reduces the amount of memory that
can be paged out. If the amount that can be paged out is too small,
Solaris cannot run as intended, and performance of all of the system's
workloads will suffer.

Some forms of shared memory (e.g. ISM) automatically lock those memory
pages. Other forms (e.g. DISM) allow the process to lock the shared
memory.

If you don't set a cap on shared memory or locked memory, the zone
might lock a significant portion of the system's RAM, leaving very
little that can be paged out if there isn't enough RAM for all of the
zones. In that situation, performance of all of the other zones will
suffer greatly, perhaps making them unusable. Performance of the zone
using shared memory may also be impacted.

However, if you set a shared memory cap on a zone that uses shared
memory, and you set it too low, performance of that zone will suffer,
or the application will fail. It is important to know how much memory
your applications will lock - if they lock any.

To determine how much memory a zone's processes lock, first find the
zone's current ID number:

GZ# zoneadm list -cv
ID NAME ...
 0 global ...
 1 myzone ...

Then use that number with the kstat command:

GZ# kstat 'caps:1:lockedmem_zone_1:usage'
module: caps  ...
name:   lockedmem_zone_1 ...
       usage:      4096

--JeffV

On Mon, Nov 29, 2010 at 2:23 PM, Enda O'Connor <enda.ocon...@oracle.com> wrote:
> Hi
> Locked memory is typically used by oracle database, ie ISM/DISM segments
> etc, not likely to be used on desktop, apps that use shared memory tend to
> try and pin it in memory to give max performance.
> I wouldn't think a desktop would need this typically.
>
> De
> On 29/11/2010 19:16, Jordan Vaughan wrote:
>>
>> "Locked memory" is the same as "pinned memory": In other words, pages
>> that won't be paged to disk. Applications can request that pages be
>> "locked" into memory. The pager won't page locked pages to disk.
>>
>> Regarding an "appropriate value for desktop usage": It depends on what
>> kinds of applications you're using. Most applications don't use
>> locked/pinned pages. I don't set this property on my desktop, but you
>> could set it to a small value. (0M?)
>>
>> Jordan
>>
>> On 11/27/10 01:15 PM, Orvar Korvar wrote:
>>>
>>> At the same time, I would like to ask exactly what is "locked" RAM?
>>> How much is an apropriate value for desktop usage? 2GB?
>>>
>>> add capped-memory
>>> set locked=2GB
>>> end
>>
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to