Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2007
    Posts
    3

    Unanswered: Space calculation

    Hi all,

    The tablespace TSBLNHST has reached the maximum 251 extents and got -904. So I altered the tablespace with priqty and secqty and the problem is resolved.

    When I was doing the analysis of how to define the Pqty and Sqty , I have got the following doubts.

    SELECT TSNAME , PQTY , SQTY , EXTENTS ,SPACE , SECQTYI
    FROM SYSIBM.SYSTABLEPART
    WHERE DBNAME = 'AFSDB' AND TSNAME = 'TSBLNHST';
    ---------+---------+---------+---------+---------+---------+---------
    TSNAME PQTY SQTY EXTENTS SPACE SECQTYI
    ---------+---------+---------+---------+---------+---------+---------
    TSBLNHST 50 15 47 198528 15


    Runstats ran today. Bufferpool is BP1 , so 4k pages is used.

    Pqty = 50 * 4 = 200 KB
    Sqty = 15 * 4 = 60 KB * 47 extents = 2820 KB + 200KB =3020 KB

    Space = 194688KB

    3.4 panel shows the following statistics about VSAM datasets.

    - Enter "/" to select action Tracks %Used XT Device
    ---------------------------------------------------------------------
    DB2NYBT.DSNDBD.AFSDB.TSBLNHST.I0001.A001 4136 ? 47 3390

    No of bytes per track = 56664
    4136 * 56664 = 234362304 bytes = 234362 KB


    The value calculated from DB2 VSAM dataset is atleast near the SPACE parameter, but I could not understand how this priqty and secondary is suffice for 194688KB bytes.

    Please let me know whether my understanding is correct and please let me know whether I need to consider anything else.

    Thanks,
    Vanitha

  2. #2
    Join Date
    Dec 2005
    Posts
    273
    The minimum portion of space, that can be allocated to a tablespace is ONE track ( = 48 kB available space ). So each value for PRIQTY and SECQTY is rounded up to the next multiple of 48 ( or 720, if CYLs are used to allocate the tablespace ).
    If tablespace is segmented, the secondary extent-size might also be adjusted, so that a complete segment can be stored.

    There are also ZPARM-parameter, which may override your specified values.
    ( e.g. MGEXTSZ=YES ).

    To see, what DB2 really allocated, do a LISTCAT on the vsam-cluster.


    By the way: Your select statement states, that there are 47 extents, but you received an abend due to 251 extents ? Seems, that one value is not up to date

  3. #3
    Join Date
    Dec 2007
    Posts
    3

    Space calculation

    I ran this query after Changing the tablespace(Reorg and Runstats).

    Even though the primary and secondary are rounded up for the tracks , it will be max 10000 KB (3020 KB) . But the space column shows 198528KB which is 138 average record length * 1410420 no of records approximately.

    My doubt is how the less number of primary quantity and secondary quantity could hold this number of bytes. Is Db2 taking the space allocation from something else. I have referred "Estimating disk storage for user data". Please guide me in understanding the concept behind the space column.

    The VSAM dataset shows in tracks and fileaid has the following.

    File-AID ------ VSAM Information - (Page 1 of 2 ) ----
    COMMAND ===>
    Catalog: CATALOG.SYSXT1
    Cluster: 'DB2NYBT.DSNDBC.AFSDB.TSBLNHST.I0001.A001'
    Data: 'DB2NYBT.DSNDBD.AFSDB.TSBLNHST.I0001.A001'
    Index:
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Data Component Information: Curre
    Device type: 3390 Load
    Organization: LINEAR EXT-ADDR Writ
    KSDS key length: 0 Buff
    KSDS key location: 0 Eras
    Average record size: 0 Imbe
    Maximum record size: 0 Repl
    Allocated Space: Unit Primary Secondary Reus
    Data: TRACKS 6 2 Shar
    Index: 0 0 Span
    Dataset Date Information: Key
    Creation date: 2007/11/28 AIX-
    Expiration date: AIX-

    Thanks,
    VAnitha

Posting Permissions

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