FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.19k stars 204 forks source link

What are reasons of using Super server mode by default? #8070

Closed gsbelarus closed 1 month ago

gsbelarus commented 1 month ago

I have conducted a test:

  1. Database size 334 GB
  2. BK file size 119 GB
  3. Server with 128 GB RAM, 20 cores CPU and fast NVMe drive
  4. Firebird parallel works configuration: Max parallel workers = 64, Parallel workers = 16

The command:

C:\Program Files\FB5>gbak -r "G:\XXXXXXXX.bk" "G:\XXXXXXXX.fdb" -user sysdba -pas XXXXXXXX -se localhost/3056:service_mgr -p NNNN -bu MMMMM

There are times obtained:

Mode Page size Buffers Time
Classic 8192 500 2:20:00
Super 8192 500 6:00:00
Super 8192 4_000_000 5:45:00

The conclusion is that the Super Server is not only less robust and reliable than the Classic Server, but it also performs much worse. So, why do we offer it as the default mode? This greatly harms Firebird because many users do not bother to make adjustments in the Firebird configuration file, and therefore end up with a worse experience.

alexeykovyazin commented 1 month ago

Hello Andrei,

First of all, you did not conducted a test: you just create useless ticket which distracts attention of Firebird developers from the real problems.

In your ticket, there is lack of very important details to reproduce a test:

1) Full Firebird Configuration files used in testing, including full Firebird version 2) Full restore log with enabled statistics (switches -ST TDRW -y logname.txt) 3) Details of Operating System used 4) Details of structure of database tested - output of gstat -r ... (it would be good also to have some justification why 8K page size is used, which is totally inappropriate for this database size). 5) Complete test plan - the selection of page buffers = 500 for SuperServer is absolutely inappropriate. There are other very important parameters - enable/disable file cache of operating system? TempCacheLimit size? 6) Optionally, it would be good to see results of simple INSERT?UPDATE/DELETE test https://ib-aid.com/en/simple-insert-update-delete-test-for-firebird/ with a lot of test results to compare.

If you are now aware about principles how to calculate the configuration, please use Configuration Calculator For Firebird to create optimized configurations for the specified hardware, for Super and Classic/SuperClassic.

If you really want to bring the value to Firebird development, please repeat the tests with optimized configurations, supply all requested information, and submit it for investigation. I will bet a bottle of best zubrowka that SuperServer will win.

Regards, Alexey Kovyazin President Of Firebird Foundation

sim1984 commented 1 month ago

First, you should familiarize yourself with how the ParallelWorkers parameter works in SuperServer and in Classic. You know that it is per-process, right?

For the purity of the experiment, it is better to return this parameter to the default value of 1. And compare using the -par switch. Well, they also told you about the page cache, it must be meaningfully selected taking into account other parameters, and not just tried two extreme values.