blospaces size
Posted in 2016
Topics: Storage & Space Management
Trying to calculate free size on blobspaces Dbspace select dbsnum|name|owner|pagesize|fchunk|nchunks|create_size|extend_size|is_mirrored|is _blobspace|is_sbspace|is_temp|flags 56|xirabld_2k|informix|4096|87|1|10.0|0.0|0|1|0|0|262161 Chunk select chknum|dbsnum|nxchknum|pagesize|chksize|offset|nfree|mdsize|udsize|udfree|is_off line|is_recovering|is_blobchunk|is_sbchunk|is_inconsistent|is_extendable|flags|f name 87|56|0|4096|262144|0|130315|-1|-1|-1|0|0|1|0|0|0|66112|/ifx11sgpa/dbspaces/xira bld_2k Server Studio says it has Total size 131072 pages - 512 MB Free Size 130315 pages - 509,04 MB Open admin says also says dbspace has has Size 512 MB Fere space 509 But when looking at chunk, open admin says its used 50.28%!!! Am I missing something here? Looks like the total pages in dbspace is calculated by total size of chunk 512MB*1024/pagesize Looks like free size is nfree. So both open admin and server calculates free size of dbspace like this: 130315/131072 with is almost 99% free But when calculating free space in chunk Open admin is doing chksize/nfree to get free space in chunk (49%) Server studio is doing 130315/131072 again getting 99% free Who is right?
The chksize on syschunk is in the default server page size (in this case 2KB), the nfree is in the dbspace page size (in this case 4KB). Server Studio Total size 131072 pages - 512 MB Free Size 130315 pages - 509,04 MB Open admin Size 512 MB Fere space 509 These values are correct, from the syschunks you get them by: SELECT fname AS chk_name, FORMAT_UNITS(chk.chksize, 'P') AS chk_size, FORMAT_UNITS(chk.nfree*chk.pagesize, 'B') AS chk_free, ROUND(((chk.nfree*chk.pagesize)*100)/(chk.chksize*shm.sh_pagesize), 2) || '%' AS free_perc FROM sysmaster:syschunks AS chk, sysmaster:sysshmvals AS shm WHERE chk.is_blobchunk = '1'; And the free percentage is 99%. The problem on reporting the percentage is on OAT size. The function showChunks on the module chunk.php use always the default server page size and that's why you get 49%. Shameless self promoting, take a look at: http://dba-snippets.blogspot.pt/2015/03/storage-monitor.html On Thu, 3 Mar 2016 at 08:49 JACOBO BALBUENA <jacobo.bc@gmail.com> wrote: > Trying to calculate free size on blobspaces > > Dbspace select > > > dbsnum|name|owner|pagesize|fchunk|nchunks|create_size|extend_size|is_mirrored|is _blobspace|is_sbspace|is_temp|flags > 56|xirabld_2k|informix|4096|87|1|10.0|0.0|0|1|0|0|262161 > > Chunk select > > > chknum|dbsnum|nxchknum|pagesize|chksize|offset|nfree|mdsize|udsize|udfree|is_off line|is_recovering|is_blobchunk|is_sbchunk|is_inconsistent|is_extendable|flags|f name > > > 87|56|0|4096|262144|0|130315|-1|-1|-1|0|0|1|0|0|0|66112|/ifx11sgpa/dbspaces/xira bld_2k > > Server Studio says it has > Total size 131072 pages - 512 MB > Free Size 130315 pages - 509,04 MB > > Open admin says also says dbspace has has > Size 512 MB > Fere space 509 > But when looking at chunk, open admin says its used 50.28%!!! > > Am I missing something here? > > Looks like the total pages in dbspace is calculated by total size of chunk > 512MB*1024/pagesize > Looks like free size is nfree. > > So both open admin and server calculates free size of dbspace like this: > 130315/131072 with is almost 99% free > > But when calculating free space in chunk > Open admin is doing chksize/nfree to get free space in chunk (49%) > Server studio is doing 130315/131072 again getting 99% free > > Who is right? > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --047d7b3a8ac063c9c7052d230e7f