Subject | Re: [firebird-support] Restoring Backup |
---|---|
Author | Hugo Eyng |
Post date | 2016-02-24T20:30:24Z |
Hello Ann.
Thank you very much.
The two hundred pages are not intended to be used for backup or restore purposes.
In fact, I use the switche '-BU 200000', in gbak -REP -c, to set the database cache pages option. This way I donĀ“t need change
the DefaultDbCachePages switche in the firebird.conf file.
I am not sure that is the best way, but I did some tests and it worked fine.
Hugo
Thank you very much.
The two hundred pages are not intended to be used for backup or restore purposes.
In fact, I use the switche '-BU 200000', in gbak -REP -c, to set the database cache pages option. This way I donĀ“t need change
the DefaultDbCachePages switche in the firebird.conf file.
I am not sure that is the best way, but I did some tests and it worked fine.
Hugo
Em 24/02/2016 16:37, Ann Harrison
aharrison@... [firebird-support] escreveu:
On Wed, Feb 24, 2016 at 12:01 PM, Hugo Eyng hugoeyng@... [firebird-support] <firebird-support@yahoogroups.com> wrote:
Referring to the buffers requested for gbak:
Why 120000? Why not? :)
There's a cost to managing a large buffer cache. Firebird will use the entirecache even if there's no particular reason to do so.
A gbak backup needs a few dozen pages for system table stuff that'sreferenced frequently and for each table backed up another few pagesthat help locate data. The data pages are read once and then are of nomore interest. So the default cache size is fine for a backup. Twohundred pages is probably enough to backup almost any database. Ifyou use a huge cache, it will be filled with useless data pages.
A gbak restore needs the same few dozen pages of system tables and
some pages for internal table management. When it is restoring data, itfills a data page and goes on to the next one. A large cache will fill withpages that will not be referenced again until the indexes are built. Tobuild indexes, Firebird reads records and sorts by keys. That mightsuggest that keeping millions of pages in cache would improve performanceby eliminating disk reads. However, unless you've got a huge amountof memory, those data pages will reduce the amount of memory availablefor the sort. The sort algorithm produces chunks of sorted key/record idpairs which are subsequently merged. The more chunks that can be keptin memory, the faster the sort. If you've used all your machine's memoryfor the cache, the sort will be slow and may start paging.
Good luck,
Ann
-- Atenciosamente, Hugo Eyng