Subject | Re: [firebird-support] Restoring Backup |
---|---|
Author | Ann Harrison |
Post date | 2016-02-24T19:37:27Z |
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 andsome 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