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 > Informix > dbspace - adding a chunk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-04, 11:21
NubianWarrior NubianWarrior is offline
Registered User
 
Join Date: Jan 2004
Posts: 4
dbspace - adding a chunk

I'm trying to figure out how do you determine which dbspace needs to have a chunk added to it when you don't know what dbspace needs it.

I have used onstat -d but doesnt seem to help. Maybe I'm just not reading it correctly.

Any help is appreciated....this is frustrating.

Thanks
Reply With Quote
  #2 (permalink)  
Old 01-14-04, 15:11
mjldba mjldba is offline
Registered User
 
Join Date: Dec 2003
Location: North America
Posts: 139
There may be an easier "command line" way to do this, but this is the easiest way I know to accomplish this. We're using IDS 9.30.UC6 on a AIX box.

As any user in the "informix" group, execute onmonitor and choose
"Databases" and you'll see a list of your DB's and the dbspace(s) that they reside in.

Armed with this information, press escape and then choose "Spaces".
Arrow-down to the dbspace and press F3. You'll be presented with a screen detailing chunk information.

This should provide you with a good starting point to address your immediate need.

Good luck
Reply With Quote
  #3 (permalink)  
Old 01-14-04, 18:23
DBAgirl DBAgirl is offline
Registered User
 
Join Date: Jan 2004
Location: San Antonio, Texas
Posts: 47
Wink Re: dbspace - adding a chunk

Hello,
This is how you use onstat -d: I have cut out some fields so make this easier to read. It has two parts, part 1 lists the names of the DBSpaces, how many chunks each space has etc. Part 2 gives you the size and free space.
So taking this ex. dbspace 15 is 51200 in size with most of it free 511947. The chk/dbs indicates the chunk # and dbspace number. You map dbs 15 in part 2 to number 15 in part 1 and see that nchunks is 1 so there is only 1 chk.

dbspace 16 has 2 nchunks and the first one is 512000 in size but free is only 1. The second chk for dbspace 16 is also full at 10 free so you need to add another chk.

Dbspaces (Part1)
address number flags fchunk nchunks name
c049c28 15 0x1 15 1 ads_db3
cc49da8 16 0x1 16 2 ads_db4

Chunks (Part 2)
address chk/dbs offset size free pathname
cc2c028 15 15 0 512000 511947 /dev/inf/db10
cc2c1b0 16 16 512000 512000 1 /dev/inf/db11
cc2c1b0 33 16 0 512000 10 /dev/inf/db15

On a side note: You could have 256000 but if someone needs to load 257000 you don't have enough space. :-)

Keep in mind that size in onstat -d is shown in blocks (I have no idea why) so you must * 2 to get the kbytes.

Regards,
AC

Quote:
Originally posted by NubianWarrior
I'm trying to figure out how do you determine which dbspace needs to have a chunk added to it when you don't know what dbspace needs it.

I have used onstat -d but doesnt seem to help. Maybe I'm just not reading it correctly.

Any help is appreciated....this is frustrating.

Thanks
Reply With Quote
  #4 (permalink)  
Old 01-15-04, 11:40
NubianWarrior NubianWarrior is offline
Registered User
 
Join Date: Jan 2004
Posts: 4
Re: dbspace - adding a chunk

First of all thank you very much for your response. I appreciate it.

So, according to your example if I were to add space to
(16)ads_dba4 should free of 10 change?????? where do I look
to see the change take affect.

Also, I've attatched an output of my onstat -d. Can you take a look
at it for me.

Thanks



Quote:
Originally posted by DBAgirl
Hello,
This is how you use onstat -d: I have cut out some fields so make this easier to read. It has two parts, part 1 lists the names of the DBSpaces, how many chunks each space has etc. Part 2 gives you the size and free space.
So taking this ex. dbspace 15 is 51200 in size with most of it free 511947. The chk/dbs indicates the chunk # and dbspace number. You map dbs 15 in part 2 to number 15 in part 1 and see that nchunks is 1 so there is only 1 chk.

dbspace 16 has 2 nchunks and the first one is 512000 in size but free is only 1. The second chk for dbspace 16 is also full at 10 free so you need to add another chk.

Dbspaces (Part1)
address number flags fchunk nchunks name
c049c28 15 0x1 15 1 ads_db3
cc49da8 16 0x1 16 2 ads_db4

Chunks (Part 2)
address chk/dbs offset size free pathname
cc2c028 15 15 0 512000 511947 /dev/inf/db10
cc2c1b0 16 16 512000 512000 1 /dev/inf/db11
cc2c1b0 33 16 0 512000 10 /dev/inf/db15

On a side note: You could have 256000 but if someone needs to load 257000 you don't have enough space. :-)

Keep in mind that size in onstat -d is shown in blocks (I have no idea why) so you must * 2 to get the kbytes.

Regards,
AC
Attached Files
File Type: txt bt.txt (20.8 KB, 49 views)
Reply With Quote
  #5 (permalink)  
Old 01-15-04, 12:05
DBAgirl DBAgirl is offline
Registered User
 
Join Date: Jan 2004
Location: San Antonio, Texas
Posts: 47
Re: dbspace - adding a chunk

No, it will not change because that is the free space for that chunk not the DBSpace. At the very bottom of the output you will see the lastest chunk to be added. It will indicate dbs 16 chk and all but a few bytes will be free.

I will look at your output and get back with you later.

Regards,
DBAgirl

Quote:
Originally posted by NubianWarrior
First of all thank you very much for your response. I appreciate it.

So, according to your example if I were to add space to
(16)ads_dba4 should free of 10 change?????? where do I look
to see the change take affect.

Also, I've attatched an output of my onstat -d. Can you take a look
at it for me.

Thanks
Reply With Quote
  #6 (permalink)  
Old 01-15-04, 14:06
DBAgirl DBAgirl is offline
Registered User
 
Join Date: Jan 2004
Location: San Antonio, Texas
Posts: 47
Re: dbspace - adding a chunk

I have gone through your onstat -d and pulled out all the chk's that are low.

I have also explained (by doing one) how to determine if the actual DBS is low.

It is very detailed and I hope not confusing. The new file is attached.

Regards,
DBAgirl

Quote:
Originally posted by NubianWarrior
First of all thank you very much for your response. I appreciate it.

So, according to your example if I were to add space to
(16)ads_dba4 should free of 10 change?????? where do I look
to see the change take affect.

Also, I've attatched an output of my onstat -d. Can you take a look
at it for me.

Thanks
Attached Files
File Type: txt bt.txt (27.5 KB, 49 views)
Reply With Quote
  #7 (permalink)  
Old 01-15-04, 17:28
NubianWarrior NubianWarrior is offline
Registered User
 
Join Date: Jan 2004
Posts: 4
Re: dbspace - adding a chunk

Thanks....this is very helpful. If you need help with something let me know and I will try to help as best as possible...I also do sqlserver, oracle and used to do sybase.

quiestion:
1. what do you consider as being low. I would suppose that its all relative but what is a usual level of space that is needed.

2. does the dbspace use the space of the chuncks in chronological order. for instance if I have 3 chuncks does the dbspace use the space in chunck 1 first then use 2 etc.... before moving on to the next chunck or does it just see space out there and grabs what it needs regardless of how many chuncks. if thats the case then should you add up the space remaining on all the chuncks to determine how much space is left for the dbspace to use?

Also I attatched the new onstat -d after adding chuncks to the following:
The chuncks are in offsets of 102400

inviewdbs01
arcsdba01
sdasdbs01
optixdbs01

Quote:
Originally posted by DBAgirl
I have gone through your onstat -d and pulled out all the chk's that are low.

I have also explained (by doing one) how to determine if the actual DBS is low.

It is very detailed and I hope not confusing. The new file is attached.

Regards,
DBAgirl
Attached Files
File Type: txt bt-chuncksadded.txt (21.1 KB, 48 views)
Reply With Quote
  #8 (permalink)  
Old 01-15-04, 17:52
DBAgirl DBAgirl is offline
Registered User
 
Join Date: Jan 2004
Location: San Antonio, Texas
Posts: 47
Wink Re: dbspace - adding a chunk

Hello,
There are many variables in determing low space but for a quick guideline: for small DB's I like to see at least 25% free space at all times. For very large DB's I try for 10% if it is possible.

It's really best to write a script using the system catalogs to check for low space but if you only have 1 or 2 DB's they can easily be checked daily.

The chunks are used in order. Of course there is always an exception. Let's say you had 10 MB free in chk 1 and 100 in chk2. If what you are loading is 11MB it will bypass chk 1 but if it is less than 10MB it will use chk 1 even though the last process used chk2 .

I have to look at your new onstat -d later. have to go walkinh now!

Regards,
DBAgirl

Quote:
Originally posted by NubianWarrior
Thanks....this is very helpful. If you need help with something let me know and I will try to help as best as possible...I also do sqlserver, oracle and used to do sybase.

quiestion:
1. what do you consider as being low. I would suppose that its all relative but what is a usual level of space that is needed.

2. does the dbspace use the space of the chuncks in chronological order. for instance if I have 3 chuncks does the dbspace use the space in chunck 1 first then use 2 etc.... before moving on to the next chunck or does it just see space out there and grabs what it needs regardless of how many chuncks. if thats the case then should you add up the space remaining on all the chuncks to determine how much space is left for the dbspace to use?

Also I attatched the new onstat -d after adding chuncks to the following:
The chuncks are in offsets of 102400

inviewdbs01
arcsdba01
sdasdbs01
optixdbs01
Reply With Quote
  #9 (permalink)  
Old 01-15-04, 18:10
DBAgirl DBAgirl is offline
Registered User
 
Join Date: Jan 2004
Location: San Antonio, Texas
Posts: 47
Wink Re: dbspace - adding a chunk

I'm still here and looked at your output.

I do not see that you added a chk to inviewdbs01 but it has one completely empty chk so it's OK.

sdasdb101 already has a free chk so it would not have needed space unless you expected more usage than normal.

arcsdbs01 and optixdbs01 had already started using the last chk available to them so adding space here was good.

Of course you know everything about this DB and I know nothing so all of it may have been correct. I am speaking only of the exercise we went though to help you get a better understanding of onstat -d.

I'll be on later if you have more questions.

Regards,
DBAgirl


Quote:
Originally posted by NubianWarrior
Thanks....this is very helpful. If you need help with something let me know and I will try to help as best as possible...I also do sqlserver, oracle and used to do sybase.

quiestion:
1. what do you consider as being low. I would suppose that its all relative but what is a usual level of space that is needed.

2. does the dbspace use the space of the chuncks in chronological order. for instance if I have 3 chuncks does the dbspace use the space in chunck 1 first then use 2 etc.... before moving on to the next chunck or does it just see space out there and grabs what it needs regardless of how many chuncks. if thats the case then should you add up the space remaining on all the chuncks to determine how much space is left for the dbspace to use?

Also I attatched the new onstat -d after adding chuncks to the following:
The chuncks are in offsets of 102400

inviewdbs01
arcsdba01
sdasdbs01
optixdbs01
Reply With Quote
  #10 (permalink)  
Old 01-16-04, 17:24
NubianWarrior NubianWarrior is offline
Registered User
 
Join Date: Jan 2004
Posts: 4
Re: dbspace - adding a chunk

You have been such a help to me. Thanks you. I was pretty busy today with some oracle stuff. I am sure that my questions can wait till monday.

Thanks



Quote:
Originally posted by DBAgirl
I'm still here and looked at your output.

I do not see that you added a chk to inviewdbs01 but it has one completely empty chk so it's OK.

sdasdb101 already has a free chk so it would not have needed space unless you expected more usage than normal.

arcsdbs01 and optixdbs01 had already started using the last chk available to them so adding space here was good.

Of course you know everything about this DB and I know nothing so all of it may have been correct. I am speaking only of the exercise we went though to help you get a better understanding of onstat -d.

I'll be on later if you have more questions.

Regards,
DBAgirl
Reply With Quote
  #11 (permalink)  
Old 01-16-04, 17:29
DBAgirl DBAgirl is offline
Registered User
 
Join Date: Jan 2004
Location: San Antonio, Texas
Posts: 47
Re: dbspace - adding a chunk

You are very welcome. Questions welcome whenever you get to them.

Regards,
DBAgirl.


Quote:
Originally posted by NubianWarrior
You have been such a help to me. Thanks you. I was pretty busy today with some oracle stuff. I am sure that my questions can wait till monday.

Thanks
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