Topic
8 replies Latest Post - ‏2013-01-11T18:44:24Z by J3RK_Kurtis_Knisely
J3RK_Kurtis_Knisely
J3RK_Kurtis_Knisely
12 Posts
ACCEPTED ANSWER

Pinned topic Mac OSX 10.8, db2 10.1 STMM warnings in db2diag

‏2012-12-23T19:50:37Z |
These warnings do not make me all warm and fuzzy. I'm an application developer, so I don't spend alot of time learning to be a DBA (but have done much research over the past few days). I pretty much have just about everything set to AUTOMATIC except for (INSTANCE_MEMORY) = 1048576 and used the DB2 10.1 AUTOCONFIGURE command on my DBM and DB's. I have tweaked kernel params, and nothing seems to stop these from displaying in my db2diag.log immediately after db2start. Any ideas?
2012-12-23-11.00.19.591540-420 I7157E706 LEVEL: Warning (OS)
PID : 476 TID : 4798283776 PROC : db2sysc
INSTANCE: db2inst1 NODE : 000
HOSTNAME: pvum00529412a.local
EDUID : 1 EDUNAME: db2sysc
FUNCTION: DB2 UDB, Self tuning memory manager, stmmAttachToShmAtStartup, probe:1062
MESSAGE : ZRC=0x87AE0103=-2018639613=STMM_MEM_ALLOC_ERROR
"STMM could not allocate some required memory"
CALLED : OS, -, shm_open OSERR: 63
DATA #1 : String, 68 bytes
/DB2_SELF_TUNING_MEMORY_MANAGER_CROSS_INSTANCE_SHARED_MEMORY_SEGMENT
DATA #2 : Hex integer, 8 bytes
0x0000000000000A02
DATA #3 : Hex integer, 4 bytes
0x00000180

2012-12-23-11.00.19.594360-420 E7864E584 LEVEL: Warning
PID : 476 TID : 4798283776 PROC : db2sysc
INSTANCE: db2inst1 NODE : 000
HOSTNAME: pvum00529412a.local
EDUID : 1 EDUNAME: db2sysc
FUNCTION: DB2 UDB, oper system services, sqloSystemControllerMain, probe:342
MESSAGE : ZRC=0x87AE0103=-2018639613=STMM_MEM_ALLOC_ERROR
"STMM could not allocate some required memory"
DATA #1 : String, 110 bytes
Could not create/attach to the STMM shared memory segment.
Automatic database memory tuning will be impacted.

(there are a few other Warnings farther down, but they don't seem as important as these--or may result from this STMM complaining issue).
Updated on 2013-01-11T18:44:24Z at 2013-01-11T18:44:24Z by J3RK_Kurtis_Knisely
  • nivanov1
    nivanov1
    53 Posts
    ACCEPTED ANSWER

    Re: Mac OSX 10.8, db2 10.1 STMM warnings in db2diag

    ‏2012-12-27T15:33:58Z  in response to J3RK_Kurtis_Knisely
    > I have tweaked kernel params

    With that level of detail the best suggestion might be to tweak it some more. What's in your /etc/sysctl.conf?

    INSTANCE_MEMORY = 1048576 means you're requesting a 4GB shared segment from the operating system. Do your hardware and kernel parameters support that?
    • J3RK_Kurtis_Knisely
      J3RK_Kurtis_Knisely
      12 Posts
      ACCEPTED ANSWER

      Re: Mac OSX 10.8, db2 10.1 STMM warnings in db2diag

      ‏2012-12-29T19:17:24Z  in response to nivanov1
      Yes, 16 Gig of Ram in my Mac. I also read this Mac OS DB2 Express-C 10.1 version supports two cores and 4 gig of ram (db2licm states this as well). I started out with the kernel params suggested for Mac OS DB2 9.5 (found the install doc for 9.5 in this thread): http://www.ibm.com/developerworks/forums/thread.jspa?threadID=238136

      kern.sysv.shmmax=1073741824
      kern.sysv.shmmin=1
      kern.sysv.shmmni=4096
      kern.sysv.shmseg=32
      kern.sysv.shmall=1179648
      kern.maxfilesperproc=65536
      kern.maxfiles=65536

      Tried this above and still the same STMM errors in my db2diag log. Actually I had these set before installation.

      Then read that shmall should be shmmax / page size on Mac OSX. My page size is 4096:
      $ pagesize
      4096

      So I proceeded to change shmall & shmmax to various values, trying shmall of everywhere from 500 Meg to 8 Gig and keeping shmmax = shmall * 4096. Rebooted each time and still the STMM errors I mentioned in this thread.

      Currently my sysctl.conf looks like this:

      kern.sysv.semune=64
      kern.sysv.shmseg=64
      kern.sysv.shmmax=8589934592
      kern.sysv.shmmin=1
      kern.sysv.shmmni=4096
      kern.sysv.shmall=2097152
      kern.maxprocperuid=512
      kern.maxproc=2048
      kern.maxfilesperproc=65536
      kern.maxfiles=65536

      So I wondering if maybe just the way the developers throttled back Express-C to 4 GB is causing this error? But the error states "OS" error.

      TIA for any suggestions.
      • nivanov1
        nivanov1
        53 Posts
        ACCEPTED ANSWER

        Re: Mac OSX 10.8, db2 10.1 STMM warnings in db2diag

        ‏2012-12-30T14:26:49Z  in response to J3RK_Kurtis_Knisely
        What happens if you set INSTANCE_MEMORY to AUTOMATIC? What are your instance configuration parameters (get dbm cfg)?
        • J3RK_Kurtis_Knisely
          J3RK_Kurtis_Knisely
          12 Posts
          ACCEPTED ANSWER

          Re: Mac OSX 10.8, db2 10.1 STMM warnings in db2diag

          ‏2012-12-31T17:22:21Z  in response to nivanov1
          Same STMM warnings when INSTANCE_MEMORY is set to automatic. After using the AUTOCONFIGURE command INSTANCE_MEMORY was set to auto, I changed it to 1 Gig in hopes it would stop with the STMM memory alloc errors.

          $db2 get dbm cfg

          Database Manager Configuration

          Node type = Database Server with local and remote clients

          Database manager configuration release level = 0x0f00

          CPU speed (millisec/instruction) (CPUSPEED) = 1.653205e-07

          Max number of concurrently active databases (NUMDB) = 5
          Federated Database System Support (FEDERATED) = NO
          Transaction processor monitor name (TP_MON_NAME) =

          Default charge-back account (DFT_ACCOUNT_STR) =

          Java Development Kit installation path (JDK_PATH) = /Volumes/ScorpioBlack/Users/db2inst1/sqllib/java/jdk64

          Diagnostic error capture level (DIAGLEVEL) = 3
          Notify Level (NOTIFYLEVEL) = 3
          Diagnostic data directory path (DIAGPATH) = /Volumes/ScorpioBlack/Users/db2inst1/sqllib/db2dump/
          Current member resolved DIAGPATH = /Volumes/ScorpioBlack/Users/db2inst1/sqllib/db2dump/
          Alternate diagnostic data directory path (ALT_DIAGPATH) =
          Current member resolved ALT_DIAGPATH =
          Size of rotating db2diag & notify logs (MB) (DIAGSIZE) = 5

          Default database monitor switches
          Buffer pool (DFT_MON_BUFPOOL) = OFF
          Lock (DFT_MON_LOCK) = OFF
          Sort (DFT_MON_SORT) = OFF
          Statement (DFT_MON_STMT) = OFF
          Table (DFT_MON_TABLE) = OFF
          Timestamp (DFT_MON_TIMESTAMP) = ON
          Unit of work (DFT_MON_UOW) = OFF
          Monitor health of instance and databases (HEALTH_MON) = OFF

          SYSADM group name (SYSADM_GROUP) = STAFF
          SYSCTRL group name (SYSCTRL_GROUP) =
          SYSMAINT group name (SYSMAINT_GROUP) =
          SYSMON group name (SYSMON_GROUP) =

          Client Userid-Password Plugin (CLNT_PW_PLUGIN) =
          Client Kerberos Plugin (CLNT_KRB_PLUGIN) =
          Group Plugin (GROUP_PLUGIN) =
          GSS Plugin for Local Authorization (LOCAL_GSSPLUGIN) =
          Server Plugin Mode (SRV_PLUGIN_MODE) = UNFENCED
          Server List of GSS Plugins (SRVCON_GSSPLUGIN_LIST) =
          Server Userid-Password Plugin (SRVCON_PW_PLUGIN) =
          Server Connection Authentication (SRVCON_AUTH) = NOT_SPECIFIED
          Cluster manager =

          Database manager authentication (AUTHENTICATION) = SERVER
          Alternate authentication (ALTERNATE_AUTH_ENC) = NOT_SPECIFIED
          Cataloging allowed without authority (CATALOG_NOAUTH) = NO
          Trust all clients (TRUST_ALLCLNTS) = YES
          Trusted client authentication (TRUST_CLNTAUTH) = CLIENT
          Bypass federated authentication (FED_NOAUTH) = NO

          Default database path (DFTDBPATH) = /Volumes/ScorpioBlack/Users/db2inst1

          Database monitor heap size (4KB) (MON_HEAP_SZ) = AUTOMATIC(90)
          Java Virtual Machine heap size (4KB) (JAVA_HEAP_SZ) = 2048
          Audit buffer size (4KB) (AUDIT_BUF_SZ) = 0
          Size of instance shared memory (4KB) (INSTANCE_MEMORY) = AUTOMATIC(3600683)
          Instance memory for restart light (%) (RSTRT_LIGHT_MEM) = AUTOMATIC(10)
          Agent stack size (AGENT_STACK_SZ) = 1024
          Sort heap threshold (4KB) (SHEAPTHRES) = 0

          Directory cache support (DIR_CACHE) = YES

          Application support layer heap size (4KB) (ASLHEAPSZ) = 15
          Max requester I/O block size (bytes) (RQRIOBLK) = 32767
          Workload impact by throttled utilities(UTIL_IMPACT_LIM) = 10

          Priority of agents (AGENTPRI) = SYSTEM
          Agent pool size (NUM_POOLAGENTS) = AUTOMATIC(100)
          Initial number of agents in pool (NUM_INITAGENTS) = 0
          Max number of coordinating agents (MAX_COORDAGENTS) = AUTOMATIC(200)
          Max number of client connections (MAX_CONNECTIONS) = AUTOMATIC(MAX_COORDAGENTS)

          Keep fenced process (KEEPFENCED) = YES
          Number of pooled fenced processes (FENCED_POOL) = AUTOMATIC(MAX_COORDAGENTS)
          Initial number of fenced processes (NUM_INITFENCED) = 0

          Index re-creation time and redo index build (INDEXREC) = RESTART

          Transaction manager database name (TM_DATABASE) = 1ST_CONN
          Transaction resync interval (sec) (RESYNC_INTERVAL) = 180

          SPM name (SPM_NAME) = pvum0051
          SPM log size (SPM_LOG_FILE_SZ) = 256
          SPM resync agent limit (SPM_MAX_RESYNC) = 20
          SPM log path (SPM_LOG_PATH) =

          TCP/IP Service name (SVCENAME) = db2c_db2inst1
          Discovery mode (DISCOVER) = SEARCH
          Discover server instance (DISCOVER_INST) = ENABLE

          SSL server keydb file (SSL_SVR_KEYDB) =
          SSL server stash file (SSL_SVR_STASH) =
          SSL server certificate label (SSL_SVR_LABEL) =
          SSL service name (SSL_SVCENAME) =
          SSL cipher specs (SSL_CIPHERSPECS) =
          SSL versions (SSL_VERSIONS) =
          SSL client keydb file (SSL_CLNT_KEYDB) =
          SSL client stash file (SSL_CLNT_STASH) =

          Maximum query degree of parallelism (MAX_QUERYDEGREE) = 1
          Enable intra-partition parallelism (INTRA_PARALLEL) = YES

          No. of int. communication buffers(4KB)(FCM_NUM_BUFFERS) = AUTOMATIC(1024)
          No. of int. communication channels (FCM_NUM_CHANNELS) = AUTOMATIC(512)
          db2start/db2stop timeout (min) (START_STOP_TIME) = 10

          WLM dispatcher enabled (WLM_DISPATCHER) = NO
          WLM dispatcher concurrency (WLM_DISP_CONCUR) = COMPUTED
          WLM dispatcher CPU shares enabled (WLM_DISP_CPU_SHARES) = NO
          WLM dispatcher min. utilization (%) (WLM_DISP_MIN_UTIL) = 5

          Communication buffer exit library list (COMM_EXIT_LIST) =

          $grep -i stmm db2diag.0.log
          FUNCTION: DB2 UDB, Self tuning memory manager, stmmAttachToShmAtStartup, probe:1062
          MESSAGE : ZRC=0x87AE0103=-2018639613=STMM_MEM_ALLOC_ERROR
          "STMM could not allocate some required memory"
          MESSAGE : ZRC=0x87AE0103=-2018639613=STMM_MEM_ALLOC_ERROR
          "STMM could not allocate some required memory"
          Could not create/attach to the STMM shared memory segment.
          • p175
            p175
            50 Posts
            ACCEPTED ANSWER

            Re: Mac OSX 10.8, db2 10.1 STMM warnings in db2diag

            ‏2013-01-11T00:41:36Z  in response to J3RK_Kurtis_Knisely
            Just an observation, why does your (INSTANCE_MEMORY) = AUTOMATIC(3600683) ?

            Should it not read (INSTANCE_MEMORY) = AUTOMATIC(1048576)
            • J3RK_Kurtis_Knisely
              J3RK_Kurtis_Knisely
              12 Posts
              ACCEPTED ANSWER

              Re: Mac OSX 10.8, db2 10.1 STMM warnings in db2diag

              ‏2013-01-11T18:44:24Z  in response to p175
              > Just an observation, why does your (INSTANCE_MEMORY) = AUTOMATIC(3600683) ?

              That's what get dbm cfg returns when I set instance_memory to automatic. I've tried many different things (and kernel tweaks).

              I'm back to this now...same STMM warnings when I db2start

              Size of instance shared memory (4KB) (INSTANCE_MEMORY) = 1048576

              I've been coding against my 3 DBs (100's of tables) and other than this STMM warning that bugs me, I've had no other issues. Very fast and nice to have a local Dev DB vs. accessing a DB over the LAN or VPN. I have full control, no DBA has control of my DBs :-)

              Ah, I get a few db2diag errors, communications as I recall when I do a db2stop, but I think those are normal, and who cares, I'm stopping the DB anyway.

              Thanks for your suggestions.
  • LeoPetraz
    LeoPetraz
    228 Posts
    ACCEPTED ANSWER

    Re: Mac OSX 10.8, db2 10.1 STMM warnings in db2diag

    ‏2013-01-10T21:41:00Z  in response to J3RK_Kurtis_Knisely
    Sorry to hear about your difficulties. I've just posted an installation guide for DB2 on Mac, which may or may not help:

    https://www.ibm.com/developerworks/forums/thread.jspa?threadID=467665&tstart=0

    Regards,

    Leons
    • J3RK_Kurtis_Knisely
      J3RK_Kurtis_Knisely
      12 Posts
      ACCEPTED ANSWER

      Re: Mac OSX 10.8, db2 10.1 STMM warnings in db2diag

      ‏2013-01-11T18:33:57Z  in response to LeoPetraz
      Thanks Leo, but those installation steps (while great to have) are exactly what I did to get DB2 10.1 installed on Mtn. Lion. I didn't have any problems with installation per se (but couldn't use the UI, db2setup -- no biggie).