Unanswered: DB2 V9.5 Tablespace -pages missing and Total pg's not equal to useable pg's
Hi friends -
I created a automatic storage tablespace with a pagesize of 16 K and initial size of 64 MB.
create large tablespace test_tbsp1 pagesize 16k managed by automatic storage autoresize yes initialsize 64 M increasesize 64 M maxsize 2 G no extent size 16 prefetchsize 16 bufferpool test_bp1 file system caching dropped table recovery on
so, the number of pages should be (initialsize/pagesize)= (64 MB /16 K) = 4096 pages
$ db2pd -db SMPT1 -tablespace 3
Database Partition 0 -- Database SMPT1 -- Active -- Up 0 days 04:48:13
Tablespace 3 Configuration:
Address Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe LastConsecPg Name
0x070000006E46AAA0 DMS Large 16384 16 No 16 2 2 Off 9 0 15 TEST_TBSP1
Tablespace ID = 3
Name = TEST_TBSP1
Type = Database managed space
Contents = All permanent data. Large table space.
State = 0x0000
Total pages = 4032
Useable pages = 3888
Used pages = 48
Free pages = 3840
High water mark (pages) = 48
Page size (bytes) = 16384
Extent size (pages) = 16
Prefetch size (pages) = 16
Number of containers = 9
From the above command ouput it is clear that the total number of pages is 4032.
Useable pages are only 3888
1) Why are the total number of pages not equal to 4096 ?
2) Why are the total pages not equal to useable pages ?
Basically, in a DMS tablespace, the following # of extents are reserved/overhead:
- 1 extent per container plus
- 3 extents per tablespace
So, in your tablespace with 9 containers, the overhead is 12 extents
useable pages = total pages - ((1 extent X # of containers) + any partial extents)
free pages = useable pages - 3 extents
I believe DB2 wants all containers to have the same size (for performance reasons) and therefore total pages is 4032 instead of 4096. As you can see from the db2pd output, TotalPgs is 448 per container (or 28 extents). If you add one extent to each container, then total pages would be 4176 which exceeds the initial size you specified (4096)