Subject RE: [firebird-support] Linux Classic 2.x
Author Leyne, Sean
> Hi Anderson,
> FB CS keeps a separate cache for each connection.
> If you set the cache size too high you could get two "problems"
> 1.) Use more RAM that is available, making the process to go to swap,
> what will be terrible
> 2.) If you are smart enough to look if the process is trashing to
> and set down the cache size the process will not trash (what is good),
> but every connection will keep a piece of the database that is most
> but a lot of duplicated data will be held by each connection (since
> there is a big chance that the most used part of the database are the
> same pages across distinct connections), so you are wasting memory to
> keep copies of the same piece of the database.

While these are valid reasons to keep the cache size small for CS, there
is another more compelling reason.

Each Classic instance must coordinate updates to the pages within their
cache. The larger number of pages, the more time is spent coordinating
the caches between the instances.

A cache of 50 pages vs. 75 pages, means that the cache has 50% fewer
pages to coordinate. With a small number of connections this is not a
significant benefit, with 200 connections, however, the difference adds
up to 5,000 pages!