Re: Is 'shared memory' pinned or swappable on HP-UX B.11.23 U ia64?



On Feb 27, 5:24 pm, Don Morris <dmor...@xxxxxxxxxx> wrote:
[snipped]

Really close -- but you've left pseudo-swap (the memory line) out.
That's allowed to be reserved as if it were disk swap to allow
large memory systems where the workloads fit in core to not bother
with a bunch of irrelevant disk swap. So your available reservation
space from the above is: (20000 + 8192 + 16355) - (27159 + 3864) or
13,524Mb. That's approximately the maximum size of a new segment --
[snipped]

Don, thank you for your detailed answer.

I have a question concerning computing the maximum size of a new
segment above.

====== 1) System status before performing a test ======

uname -srvm
HP-UX B.11.23 U ia64



ipcs -mb
IPC status from /dev/kmem as of Thu Feb 28 09:54:20 2008
T ID KEY MODE OWNER GROUP SEGSZ
Shared Memory:
m 0 0x411c11f2 --rw-rw-rw- root root 348
m 1 0x4e0c0002 --rw-rw-rw- root root 61760
m 2 0x41280028 --rw-rw-rw- root root 8192
m 3 0x00a5c581 --rw------- sfmdb users 10469376
m 32772 0x06347849 --rw-rw-rw- root root 65544
m 327685 0x0c6629c9 --rw-r----- root root 21968472
m 65542 0x491421e2 --rw-r--r-- root root 22908
m 1441799 0x41bd82ec --rw-r----- oracle dba 4211093504
m 22413320 0x00000000 D-rw------- -1 -1 46084
m 9 0x01300072 --rw-rw-rw- root root 1024
m 10 0x0130009e --rw-rw-rw- root root 1070
m 11 0x01300058 --rw-rw-rw- root root 1036
m 12 0x013000a0 --rw-rw-rw- root root 1078
m 13 0x013000a8 --rw-rw-rw- root root 1034
m 14 0x013000ab --rw-rw-rw- root root 1042



swapinfo -atm
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 0 8192 0% 0 - 1 /dev/vg00/
lvol2
dev 20000 0 20000 0% 0 - 1 /dev/
vgxp02/lvol21
reserve - 5577 -5577
memory 16355 3866 12489 24%
total 44547 9443 35104 21% - 0 -


kctune shmmax
Tunable Value Expression Changes
shmmax 0x600000000 0x600000000 Immed

So, shmmax = 0x600000000 = 3 * 2^33 = 24GB

======================================================



====== 2) Parameters of the test ======

mySegmentSize = 0x590000000 = 22.25GB < shmmax

shmget (myKey, mySegmentSize, 0600) is to be performed

=======================================



====== 3) Expected results ======

Compute the maximum size of a new segment in our case
(see output of 'swapinfo -atm' above):

a) According the approach taking into consideration pseudo-swap
MAX_SIZE1 = cell[row 'total'][column 'Mb FREE'] = 35104MB = 34.28GB

b) According the approach that doesn't take into consideration pseudo-
swap
MAX_SIZE2 = cell[row 'dev'(1)][column 'Mb FREE']
+ cell[row 'dev'(2)][column 'Mb FREE']
- cell[row 'reserve'][column 'Mb FREE']
= 8192 + 20000 - 5577 = 22615 = 22.085GB

So, according to the "pseudo-swap" approach
mySegmentSize < MAX_SIZE1 and shmget (myKey, mySegmentSize, 0600)
should succeed.

On the other hand, according to the "non-pseudo-swap" approach
mySegmentSize > MAX_SIZE2 and shmget (myKey, mySegmentSize, 0600)
should fail.


=================================


====== 4) Actual results ======

shmget (myKey, mySegmentSize, 0600) failed
with errno = ENOMEM (Not enough space)

===============================


Have I missed something?

Thank in advance,

Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn
.



Relevant Pages

  • [RFC][PATCH 0/9] Network receive deadlock prevention for NBD
    ... Convergence of network and storage paths" ... "Net vm deadlock fix " ... Maybe it is another memory deadlock, ... dipping into the memalloc reserve if it must. ...
    (Linux-Kernel)
  • Re: [PATCH 00/28] Swap over NFS -v16
    ... memory they can consume. ... So we need the extra (skb) ... included in the reserve? ... if the allocation had to dip into emergency reserves, ...
    (Linux-Kernel)
  • Re: Windows 2000 Server StandardEdition /PAE Question
    ... I would like to add here that the reserved memory address space by the devices is not necessarily reserved to talk to the processor. ... They may not necessarily talk to the processor at those addresses but the end result is the same, the private addresses will be marked as off limits to the processor and the RAM will still end up short of addresses in the lower 4GB memory arena. ... For example, the BIOS and system board will reserve and use a bit less than 1 megabyte of address space directly at the processor, when the processor needs to talk with the BIOS or motherboard it will do so directly by using their reserved addresses, the addresses reserved by and given to the system board cannot be used by the RAM. ... Windows 2000 Professional, Windows 2000 Server, Windows XP 32-bits and Vista 32-bits do not make full use of this /PAE feature, they are unable to use RAM addressed above the 4GB boundary. ...
    (microsoft.public.win2000.general)
  • FlashROM as as a FAT-disk in CE 5.0?
    ... Eboot.bib and virtual memory map and possibly ... RAM 83100000 $RAM ... Reserve ZBANK virtual block (No physical memory ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [PATCH] reserve end-of-conventional-memory to 1MB on 32-bit
    ... This patch adds explicit detection of the EBDA and reservation ... the EBDA size was hardcoded as 4Kb. ... we'll fake a memory map. ... * workaround for Dell systems that neglect to reserve EBDA ...
    (Linux-Kernel)