Professional Web Applications Themes

DB2 shared memory and extended storage - IBM DB2

Hi all, I'm getting very confused about how DB2 uses shared memory and I wonder if someone could clarify matters for me, please ? We are running 32bit DB2 V7.2 FP9 under AIX 4.3.3 on a machine with 64 Gb of memory with a single non-partitioned database using extended storage and with intra-parallelism enabled. I've been experimenting with changing various parameters in an attempt to make my buffer pool as large as possible but I can't make it bigger than about 700 Mb and still get the database to activate. From what I've read in the manuals and on the ...

  1. #1

    Default DB2 shared memory and extended storage

    Hi all,

    I'm getting very confused about how DB2 uses shared memory and I
    wonder if someone could clarify matters for me, please ?

    We are running 32bit DB2 V7.2 FP9 under AIX 4.3.3 on a machine with 64
    Gb of memory with a single non-partitioned database using extended
    storage and with intra-parallelism enabled.

    I've been experimenting with changing various parameters in an attempt
    to make my buffer pool as large as possible but I can't make it bigger
    than about 700 Mb and still get the database to activate.

    From what I've read in the manuals and on the internet I believe that
    DB2 should be able to use a maximum of 7 shared memory segments, which
    is about 1.75 Gb of memory, that is used for everything except the
    agents private memory (i.e. DBM shared memory + Db global memory +
    Application global memory + Agent/application shared memory). Is that
    correct ?

    Again from what I've read it seems that:

    DBM shared memory = Monitor heap(mon_heap_sz) + Audit buffer size
    (audit_buf_sz) + Global control block(How big is this ?) + FCM
    Connection Entries(fcm_num_connect) + FCM Message Anchors
    (fcm_num_anchors) + FCM Request Block (fcm_num_rqb) + FCM
    Buffers(fcm_num_buffers) + FCM Control Block(How big ?) + Something
    for the database agents, the manual isn't clear what.

    and

    Max DB global memory = Buffer Pool size + Locklist(locklist) +
    Database Heap(dbheap) + Utility Heap Size(util_heap_sz) + Package
    Cache(pckcachesz) + Extended memory cache (How big ?)

    and

    Application global memory = app_ctl_heap_sz

    and

    Agent/Application shared memory = Application support layer
    heap(aslheapsz) + Client I/O block (rqrioblk)


    Adding all these things up gives me a total of 940Mb which added to
    the Global Control Block, FCM Control Block, Extended memory cache and
    something for the agents should give a grand total of 1.75 Gb.

    So, should those last four things use about 800 Mb of memory or have I
    missed something ?


    The manual also states that the database global memory is affected by
    the numdb parameter but I've tried changing this from 8 to 1 with no
    affect on the total shared memory used.

    On a slightly related note, there is a comment in the manual that the
    size of the extended storage segments (ESTORE_SEG_SZ) is operating
    system dependent but nowhere can I find anything about what a sensible
    value for that parameter is. I have found that using 264 segments of
    16000 pages each uses more shared memory than 66 segments of 64000
    pages each but I don't know why or if it's better to use lots of
    little segments rather than a few big ones!

    Also, I suspect I'm not using FCM (DB2_FORCE_FCM_BP is not set), am I
    still allocating memory to FCM if the four FCM parameters are set to
    non-zero values ?

    Cheers,

    Jeremy Goodall
    Jeremy Guest

  2. #2

    Default Re: DB2 shared memory and extended storage

    Jeremy, just a quick reply befor I dive into this one more!
    The number of segments you define should be equal to the number of BPs
    that are defined to use Ext. Storage.
    The size of the segments is then the result of:
    Amount of Storage planned for Estore divided by no. of segments.

    For the rest it seems you have the right approach but I want to look
    further into it.
    HTH, Pierre.

    Jeremy wrote: 

    --
    Pierre Saint-Jacques
    IBM DB2 Cerified Solutions Expert - Administration
    SES Consultants Inc.

    P. Guest

  3. #3

    Default Re: DB2 shared memory and extended storage

    "Jeremy" <co.uk> wrote in message
    news:com... 

    You might try running the Performance Wizard and give DB2 a total amount of
    memory and then let the wizard allocate it among the components. That could
    be used as a starting point for further tuning efforts.


    Mark Guest

  4. #4

    Default Re: DB2 shared memory and extended storage

    On Fri, 17 Oct 2003 14:48:59 -0600, "Mark A" <net>
    wrote:

     

    Mark,

    Thanks for the tip. I've tried that but the performance wizard just
    recommends allocating 54 Gb to the bufferpools which won't work,

    Cheers,

    Jeremy
    Jeremy Guest

  5. #5

    Default Re: DB2 shared memory and extended storage

    "> >You might try running the Performance Wizard and give DB2 a total amount
    of [/ref]
    could 
    >
    > Mark,
    >
    > Thanks for the tip. I've tried that but the performance wizard just
    > recommends allocating 54 Gb to the bufferpools which won't work,
    >
    > Cheers,
    >
    > Jeremy[/ref]

    Actually, I have only used Performance Wizard on DB2 version 8 for Linux. It
    seemed to work fairly well, but not sure about your AIX memory issues.


    Mark Guest

  6. #6

    Default Re: DB2 shared memory and extended storage

    On Fri, 17 Oct 2003 16:23:47 -0400, "P. Saint-Jacques"
    <net> wrote:
     

    Pierre,

    Not really, I'm afraid. We have a single buffer pool and intend
    allocating up to 32 Gb of extended memory.
    We are using 4k pages so 32 Gb of storage would be over 8 million
    pages which is somewhat more than the upper limit for estore_seg_sz
    which is just over a million pages.

    Should we be using the smallest number of segments then(i.e. 8
    segments, each about one million pages in size) or are you saying that
    a buffer pool can only use a single segment ?

    Cheers,

    Jeremy
    Jeremy Guest

  7. #7

    Default Re: DB2 shared memory and extended storage

    If you have 32 GB and want to use it effectively, one of the following
    things may be more efficient that extended storage:

    1. 64-bit DB2
    2. use the memory for file system caching if the database is on SMS or
    DMS with files
    3. consider DB2 EEE with between 8 and 16 partitions.

    Jeremy wrote:
     
    >
    >
    > Pierre,
    >
    > Not really, I'm afraid. We have a single buffer pool and intend
    > allocating up to 32 Gb of extended memory.
    > We are using 4k pages so 32 Gb of storage would be over 8 million
    > pages which is somewhat more than the upper limit for estore_seg_sz
    > which is just over a million pages.
    >
    > Should we be using the smallest number of segments then(i.e. 8
    > segments, each about one million pages in size) or are you saying that
    > a buffer pool can only use a single segment ?
    >
    > Cheers,
    >
    > Jeremy[/ref]

    Blair Guest

  8. #8

    Default Re: DB2 shared memory and extended storage

    On Fri, 17 Oct 2003 18:46:00 -0400, Blair Adamache
    <> wrote:
     

    Blair,

    Thanks for that but we can't use 64 bit DB2 as our client application
    is then unable to communicate with the database. That was our
    preferred option.

    Regarding your second point, we did actually work this way for some
    time whilst we were on V6.1 (because of a suspected instability of
    extended memory under V6.1 and AIX 4.3) and found that we were still
    doing significant physical I/O. In fact, when we switched on extended
    memory the system performance doubled so my impression is that
    extended memory is a much more efficient use of memory than file
    system caching, if only for our particular system.

    We may be forced down the EEE route but for the moment I'd prefer to
    avoid the extra complexity that would involve if at all possible. I am
    a little nervous about extended memory, if only because there is so
    little doentation about it, but it appears to be the most sensible
    way to go at present.

    Just to avoid any confusion, we've actually got 64 GB on the machine
    but intend using 32 GB for extended memory.

    Cheers,

    Jeremy
    Jeremy Guest

  9. #9

    Default Re: DB2 shared memory and extended storage

    Okay - I suppose you could always move to v8 to get around the client
    problem.

    Jeremy wrote:
     
    >
    >
    > Blair,
    >
    > Thanks for that but we can't use 64 bit DB2 as our client application
    > is then unable to communicate with the database. That was our
    > preferred option.
    >
    > Regarding your second point, we did actually work this way for some
    > time whilst we were on V6.1 (because of a suspected instability of
    > extended memory under V6.1 and AIX 4.3) and found that we were still
    > doing significant physical I/O. In fact, when we switched on extended
    > memory the system performance doubled so my impression is that
    > extended memory is a much more efficient use of memory than file
    > system caching, if only for our particular system.
    >
    > We may be forced down the EEE route but for the moment I'd prefer to
    > avoid the extra complexity that would involve if at all possible. I am
    > a little nervous about extended memory, if only because there is so
    > little doentation about it, but it appears to be the most sensible
    > way to go at present.
    >
    > Just to avoid any confusion, we've actually got 64 GB on the machine
    > but intend using 32 GB for extended memory.
    >
    > Cheers,
    >
    > Jeremy[/ref]

    Blair Guest

Similar Threads

  1. Shared memory and Mac OS X
    By Wes in forum PostgreSQL / PGSQL
    Replies: 5
    Last Post: February 22nd, 04:01 AM
  2. Shared Memory/Shared Buffers
    By Alex Turner in forum PostgreSQL / PGSQL
    Replies: 1
    Last Post: January 28th, 04:09 PM
  3. 7.2 Linux and extended storage
    By andreyp#Antispam@mapsitnA#e-vision-group.com in forum IBM DB2
    Replies: 4
    Last Post: August 27th, 07:22 PM
  4. extended shared memory
    By aixtest in forum AIX
    Replies: 3
    Last Post: August 22nd, 03:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139