Discussion:
[firebird-support] How to estimate free space inside database file
Bryan Cole bryan.cole@teraview.com [firebird-support]
2016-10-25 17:03:50 UTC
Permalink
Hi,

I am trying to figure out the amount of free space within my database, so that I can detect when I'm nearing exhausting the disk space. I'm using firebird-v2.5.2.

I know that (total_pages * page_size) = size on disk. This doesn't tell me how many of those allocated pages are free. If I delete a large number of records, the file size remains the same but pages should be freed internally. It is this free space I need to measure. While gstat gives me the number of data pages for each table, this *doesn't* include BLOB pages (which are the bulk of my data). How can I count BLOB pages?

Thanks,
BC
Dimitry Sibiryakov sd@ibphoenix.com [firebird-support]
2016-10-25 18:14:47 UTC
Permalink
Post by Bryan Cole ***@teraview.com [firebird-support]
I am trying to figure out the amount of free space within my database, so that I can
detect when I'm nearing exhausting the disk space. I'm using firebird-v2.5.2.
Look at DBInfo: http://ibsurgeon.com/en/ibsurgeon-free-tools/
--
WBR, SD.


------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-***@yahoogroups.com
firebird-support-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-***@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
Bryan Cole bryan.cole@teraview.com [firebird-support]
2016-10-26 09:50:14 UTC
Permalink
Thanks for this info. Sadly, I'm unable to use the ibsurgeon tools. My database is running on a headless linux server. I need to estimate the database free space from another server-application. Thus, a linux commandline tool or library would work for me. Better would be a SQL query I can use to get this info.

Any other hints as to how to count BLOB pages?

Thanks,
BC

________________________________________
From: firebird-***@yahoogroups.com [firebird-***@yahoogroups.com]
Sent: 25 October 2016 19:14
To: firebird-***@yahoogroups.com
Subject: Re: [firebird-support] How to estimate free space inside database file
Post by Bryan Cole ***@teraview.com [firebird-support]
I am trying to figure out the amount of free space within my database, so that I can
detect when I'm nearing exhausting the disk space. I'm using firebird-v2.5.2.
Look at DBInfo: http://ibsurgeon.com/en/ibsurgeon-free-tools/


--
WBR, SD.


------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links
Dimitry Sibiryakov sd@ibphoenix.com [firebird-support]
2016-10-26 09:52:59 UTC
Permalink
Post by Bryan Cole ***@teraview.com [firebird-support]
Sadly, I'm unable to use the ibsurgeon tools. My database is running on a headless linux
server. I need to estimate the database free space from another server-application.
Use other approach: estimate free space on disk using "df" command.
--
WBR, SD.


------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu. Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-***@yahoogroups.com
firebird-support-***@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-***@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
Loading...