If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > how would you estimate used container space

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-09, 15:18
jrich523 jrich523 is offline
Registered User
 
Join Date: Nov 2007
Posts: 14
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
Reply With Quote
  #2 (permalink)  
Old 12-01-09, 15:42
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
  #3 (permalink)  
Old 12-01-09, 16:15
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
I live close to Nick, but I don't see how full each container is from the tablespace snapshot
Reply With Quote
  #4 (permalink)  
Old 12-01-09, 16:26
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
I meant it doesn't show number of used pages at the container level
Reply With Quote
  #5 (permalink)  
Old 12-01-09, 16:43
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
My bad. I'll move.
Reply With Quote
  #6 (permalink)  
Old 12-01-09, 17:54
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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
Reply With Quote
  #7 (permalink)  
Old 12-01-09, 18:38
jrich523 jrich523 is offline
Registered User
 
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
Quote:
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
Reply With Quote
  #8 (permalink)  
Old 12-01-09, 18:49
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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.
Reply With Quote
  #9 (permalink)  
Old 12-01-09, 19:55
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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
Reply With Quote
  #10 (permalink)  
Old 12-02-09, 10:56
jrich523 jrich523 is offline
Registered User
 
Join Date: Nov 2007
Posts: 14
Thanks! thats very helpful!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On