Comparing Superserver and Classic Server Architecture - Firebird

While Superserver and Classic server share many common characteristics—indeed, they are built from the same codebase —they present quite distinct models of operation under the hood.

Executable and Processes

Classic server runs one server process per connection, on demand. When a client attempts to connect to a Firebird database, an instance of the fb_inet_server executable is initiated and remains dedicated to that client connection for the duration of the connection. When the client detaches from the database, the server process instance ends.

The Classic server network and process model

The Classic server network and process model

Superserver runs as a single invocation of the fbserver executable. fbserver is started once, by a system boot script or by the system administrator, and stays running, waiting for connection requests. The process is terminated by an explicit shutdown.

The Superserver network and process model

The Superserver network and process model

Lock Management

On Classic server, each client’s server process has its own, dedicated database cache and multiple processes contend for access to the database. A lock manager subsystem, fb _lock _mgr, uses inter-process communication (IPC) methods to arbitrate and synchronize concurrent page access among the processes.

On Superserver, the lock manager is implemented as a thread within the fbserver process and uses inter-thread communication mechanisms instead of POSIX signaling.

Resource Use

On Classic server, each instance of fb _inet _server is allocated a static cache of database pages in its memory space. Resource growth per additional client connection is therefore linear. However, when the number of concurrent connections is relatively low, Classic server uses fewer overall resources.

Superserver employs a single cache space that is shared by client attachments, allowing more efficient use and management of cache memory when the number of simultaneous connections grows larger.

Local Access Method

Classic server permits application processes that are running on the same machine as the server and databases to perform I/O on database files directly.

Except for the Embedded Server, Superserver requires applications to use a network method for I/O requests and satisfies those requests by proxy. On Linux, Superserver does not support direct local access.

  • On non-Windows platforms (and recommended for Windows too) local connections to Superserver are made through the localhost server (at IP address, by convention).
  • A Windows server and local client can simulate a network connection in the shared IPC space. This mechanism, referred to as the local access method , cannot handle multiple connections safely. Beyond Firebird 1.5, it is superseded by a local access method using the XNET subsystem.

Embedded Server can use only the “Windows local” access method and supports one and only one connection to each local database. The embedded client can connect to multiple local databases exclusively and access them through the embedded server. The embedded client can also connect as a regular network client to databases on other servers.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Firebird Topics