Results 1 to 10 of 10
  1. #1
    Join Date
    Nov 2007
    Posts
    14

    Unanswered: how would you estimate used container space

    so, from what i can tell there is no way to tell how full a container is so im trying to find the best way to estimate it...

    the method i think is probably the best is to do container total / tabelspace total which gives you a % of how much that container is of the total tablespace.. i then multiply the % and tablespace used which is one way to show how much of that container is used.

    from what i've read the containers fill in a round robin way so would it be better to take the total used and divide it by the number of containers?

    the second method assumes both containers were created at the same time, and in coding i'd need more error checks because its possible i assign more used than the container even has if the containers are not the same size.

    i know to some extent this doesnt really matter because its a matter of how full the tablespace is and not the container, but im trying to visually display drive info and to management, the remaining container space is important.

    Thanks
    Justin

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by jrich523 View Post
    so, from what i can tell there is no way to tell how full a container is
    Did you try the tablespace snapshot? Where I live it shows each container utilization.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    I live close to Nick, but I don't see how full each container is from the tablespace snapshot

  4. #4
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    I meant it doesn't show number of used pages at the container level

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    My bad. I'll move.
    ---
    "It does not work" is not a valid problem statement.

  6. #6
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    I don't think there is an easy way to tell how full each container is. db2 only lists "Used pages" at the tablespace level, not at the container level. Since db2 accesses containers in a round-robin fashion (on extent basis), each container will generally have the same amount of used space - assuming that each of your containers is the same size (and it should be).

    So, I'd go with used pages / # of containers

  7. #7
    Join Date
    Nov 2007
    Posts
    14
    Quote Originally Posted by db2girl View Post
    I don't think there is an easy way to tell how full each container is. db2 only lists "Used pages" at the tablespace level, not at the container level. Since db2 accesses containers in a round-robin fashion (on extent basis), each container will generally have the same amount of used space - assuming that each of your containers is the same size (and it should be).

    So, I'd go with used pages / # of containers
    when you say
    assuming that each of your containers is the same size (and it should be).
    is that a best practice or is it forced upon you?
    im not much of a DB2 guy, so this is all new to me.. we have an app that is running on DB2 7.2 (we are in the process of upgrading to v9 i believe) and im monitoring parts of the app, DB usage is part of that.

    we tend to grow out as needed (no real DBA, the company handles it, and they go through DBA's like water)
    so im monitoring the tablespaces to make sure they dont get filled (no auto grow) and then im monitoring the drives they are on (in case the vendor does something, and for trending)

    so, i assume i was right with the container used info, so the question is, is either one of my guesses in the orginal post better than the other?

    Thanks for the info.
    Justin

  8. #8
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    For performance reasons, containers should be the same size. Also, with SMS - tablespace is considered full when one of its containers is full so this is something to keep in mind if you're using SMS.


    As far as container usage, I'd not worry about it too much... just monitor the tablespace usage.

  9. #9
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Quote Originally Posted by jrich523 View Post
    when you say

    is that a best practice or is it forced upon you?

    Please take a look here:
    IBM DB2 9.5 Information Center for Linux, UNIX, and Windows

  10. #10
    Join Date
    Nov 2007
    Posts
    14
    Thanks! thats very helpful!

Posting Permissions

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