Subject Re: [firebird-support] Re: Classic vs SS
Author Ann W. Harrison
Hannes Streicher wrote:
> Superserver performs better on disk intensive uses because it can use
> a larger cache

Not exactly. SS uses single cache shared by all connections
so hot pages (e.g the header page, pointer pages, transaction
inventory pages, generator page) can be updated by several
connections before they have to be written to disk to make
a commit durable.

> Classic is better for cpu intensive usage

Classic can use multiple processors because each connection
is its own process. However, when a classic process wants
to generate a new sequence value, it must get a write lock on
the generator page. If some other connection is also generating
values, the first connection's request for a write lock on the
page forces the second connection to write the page to disk so
it can release its write lock. Then the first connection reads
the page back into its cache so it can make its change. When
the other connection needs a new value, it asks for a write lock
which forces the first connection to write the page to disk and
release its lock, and so on, with the page ping-ponging from
cache to disk to cache.

Best regards,