How to clear Firebird cache?

How do I clear the Firebird request cache to run my performance tests?

SqlServer example here

Tks

+4
source share
3 answers

Andrey is right - Firebird is highly dependent on the OS file system cache. Firebird will cache a small number of pages inside (check the buffers property in your database), however, as a rule, this is a very small amount of data. Classic defaults are approximately 75 pages? I saw offers of about 1,000 pages elsewhere that go out at 8 or 16 MB depending on page size.

Instead of restarting the OS to clear the file system cache, you can put your database on your own mount. Then, to completely clear the cache, you can stop Firebird, unmount / mount the partition, and start Firebird again. This will invalidate the file system cache.

This should not be too painful - unlike other databases, Firebird should not scan data files at startup and re-transactions in the transaction log. The translation log is essentially combined with the data file through careful recording.

+3
source

In addition to the memory buffer for frequently used data pages, Firebird uses the OS file cache. A bonus restart of the server process can clear the memory buffer, but to clear the file cache, I'm afraid you need to restart the OS.

+1
source

I think restarting the Firebird service is the easiest (only?) Way.

0
source

All Articles