DB2, AIX 4.3.3 and pinned shared memory 
Author Message
 DB2, AIX 4.3.3 and pinned shared memory

Hi!

I hope some DB2 developement people can answer such stupid question...

In AIX 4.3.3 was introduced new wonderful feature - pinned shared memory.
Application can lock shared memory into real memory, so VMM
does not touch it (does not page/swap it out)

Its quite useful, and i want to use it on all my database servers.
Paging out database cache is quite bad for perfomance, you know ;-)

For Oracle 8.1.5, it works perfectly. I specify 50MB for oracle SGA and
AIX allocates 50MB shared memory segment from real memory,
that 50MB cannot be paged out and they all lived happily ever after...

For DB2 (both for v5.2 and 6.1) i cannot use this feature.
EVERY damned db2 instance (even admin server) allocates
by default one 100MB segment, and when that v_pinshm kernel
option is enabled (with "vmtune -S 1") the multiple 100MB segments
are allocated from real memory.
For EACH instance including admin server 100MB!
OK, i don't care if i had to deal with one database on production
environment with 8GB RAM, but i have to keep up several small
DB2 instances with 512MB !

Why, dear DB2 developement team?
Any workarounds, bugfixes?
Or is it normal feature and i just cannot use it with
small databases?

Why cannot each DB2 database allocate shm of their
own, and only when they need that memory not 100MB
by default?
How can Oracle do this ?

This AIX kernel feature is disabled by default and i don't have to use it.
(when pinned shm is disabled, just some DB2 instance IPC stuff is
allocated and less than 10MB per instance, but still one 100MB
shm segment is created. AIX just doesn't allocate REAL memory for that 100MB

Sorry for my english and if i have misused this AIX feature,
somebody tell me why it was introduced at all...

---
Hasso Brck
Technical Manager
Korel SYS Ltd.



Fri, 23 Aug 2002 03:00:00 GMT
 DB2, AIX 4.3.3 and pinned shared memory

I'm having a little trouble understanding your post but I'll try to
respond the best I can..  Please re-post if my reply is unclear or if
I have misunderstood you.

Enabling pinned memory thru. vmtune (vmtune -S 1) allows applications
to *possibly* pin shared memory segments by providing the flag SHM_PIN
at shmget( ) time.  This flag is designed to be advisory and no error
is returned by the system call if the memory region could not be
pinned.  In short, unless the application (in this case the DB2 engine)
EXPLICTLY asks for shared memory it shmget()'s  to be pinned - it will
never be pinned.

On DB2 V6.1 Fixpack 3, we added the ability for you to pin the buffer
pool.  This is under registry variable control and you can either set
or not set the registry variable per instance in your case.  The
registry variable is:

DB2_PINNED_BP

This can be set by "db2set DB2_PINNED_BP=TRUE"

If you don't have this registry variable set, there is no way that ANY
of the shared memory that DB2 allocates can ever be pinned.

Hope this helps,
-Aamer

Quote:
> Hi!
> I hope some DB2 developement people can answer such stupid question...
> In AIX 4.3.3 was introduced new wonderful feature - pinned shared memory.
> Application can lock shared memory into real memory, so VMM
> does not touch it (does not page/swap it out)



Tue, 27 Aug 2002 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Pinning Shared Memory in AIX

2. Shared Memory - Pinning a procedure

3. virtual shared-memory segments/AIX-4.3.3/IDS-9.21UC4

4. virtual shared-memory segments/AIX-4.3.3/IDS-9.21UC4

5. Allocating shared memory IBM S80 / AIX 4.3.3 / IDS 7.3

6. Vedr: Allocating shared memory IBM S80 / AIX 4.3.3 / IDS 7.3

7. Shared Memory Segment Size on AIX?

8. D3 / AIX -- Shared Memory Limit

9. DB2 for AIX 6.1, C for AIX 4.4, Apache 1.3.11 running on AIX 4.3.3

10. DB2 UDB 7.1 AIX memory above 2 GB?

11. db2 and shared memory

12. Pinning objects in Shared Pool helpful?


 
Powered by phpBB® Forum Software