Subject Re: [firebird-support] Sizing a dedicated Firebird server (Linux)
Author Milan Babuskov
Hi Myles,

I believe that anyone would need more info before answering any of your

Myles Wakeham wrote:
> serve about 50-150 concurrent connections (ie. queries) on the Firebird
> server from these external connections.

50-150 queries in which timeframe? You can have 150 connections sitting
there idle with 386 ;)

> 2. Memory requirements to support this number of users. Again, the
> queries are typically short and sweet. But some can be taxing on the
> server, so I'd like to have the machine sized with adequate memory for
> the following levels:

How big are the databases? What's the size of your indexes? If all index
pages can fit into RAM you can have great performance.

> a. 50 concurrent queries
> b. 100 concurrent queries
> c. 150 concurrent queries

This mostly depends on the server model you choose (CS,SS,SC) and the
values you set up firebird.conf for cache.

I can give you an example. I run a server with a single 20GB database,
answering to about 95 queries per second. On average that's 30
concurrent users running about 3 queries per page load. One of those 3
queries is a select from 18-million-rows table that uses composite index
on 2 fields. About 85% of queries are SELECTs and *all* queries use
indexes. There are some batch jobs that cannot use indexes effectively,
so they run off-hours. I have some statistics: in the past 14 days I had
only 2 queries out of 117.297.240 that took longer than 10 seconds to

On this same server I run Apache+PHP and nginx in front of Apache. There
are 2 main reasons for nginx:

1. I can turn off keepalive on Apache and thus free a lot of RAM while
still keeping the website "quick" for the users

2. I serve all the static content with almost no overhead. nginx takes
about 1 to 1.5% of RAM even with thousand of connections.

Apache usually peaks at about 40 processes at a single moment, each
taking about 25MB of RAM. So, at peak load I "waste" about 1GB of RAM to
web server. I'm writing this because the server has 2GB of RAM, so
memory available to database server goes from 1 to 1.6GB during the day.

The system is AMD Athlon64 X2 DualCore 5600. Not really state of the
art. I would pick 4 or 8-core Intel i7 if I had bigger needs (and
budget). There are two 500GB Samsung HD501LJ SATA disks in RAID-1.

On this hardware, the system load is around 1.30 on average, and peaks
at about 2.50 during a busy day.


Milan Babuskov

The easiest way to import XML, CSV
and textual files into Firebird: