gbak under Win2012 vs Win2019

141 views
Skip to first unread message

Dany40

unread,
Nov 15, 2025, 6:23:25 PMNov 15
to firebird-support
Hello;

In a virtual machine under SSD disk drive, with 16 GB RAM and 4 CPU, I do the next tets:

1) I install a clean Windows 2012 R2
or
2) I install a clean Windows 2019

In both cases, I try a GBak (using the service), backing up a local FDB (24 GB) to one FBK on the same disk.

In (1) it needs 4 minutes.
In (2) it need 25 mintunes (I also tried with parallel switches but nothing changes).

I tried the same building VMs under diferents phisic machines, but the result is allways a big diference in performance, like the one descriebed.

In all the cases we stoped Windows Antimalwares, defenders, and etc.

What can be the problem?

Tomasz Tyrakowski

unread,
Nov 15, 2025, 6:44:59 PMNov 15
to firebird...@googlegroups.com
Have you tested the I/O performance on both VMs? How long does it take
to simply copy the DB file to a new one, on both Windows versions? Maybe
the slowdowns have nothing to do with Firebird as such (maybe they do,
but I'd try to rule out the simple causes first).

regards
Tomasz



Dimitry Sibiryakov

unread,
Nov 16, 2025, 5:04:54 AMNov 16
to firebird...@googlegroups.com
Dany40 wrote 16.11.2025 0:23:
> What can be the problem?

According to Google you are not alone and the problem is not specific to
Firebird.

https://learn.microsoft.com/en-in/answers/questions/2243033/poor-performance-in-windows-2019-rds-virtual-machi

--
WBR, SD.

Dany40

unread,
Nov 16, 2025, 10:40:27 AMNov 16
to firebird-support
I will present the case in other words: I can't find any environment configuration in where I can reproduce the same performance I get under Windows 2012 R2. I come trying this for weeks. I tested also in very fast machines with non-virtual enfironments, but In all the cases GBak needs more than double of time (in the better case) to do the same how. For example:

- In the VM with W2012 with 16 GB RAM and 4 CPU it takes  10 minutes for backing up a file size of 60.400.336.896 bytes.

- In a non VM machine with Windows 11 PRO, 32 GB RAM, 13th Gen Intel(R) Core(TM) i9-13900, and M2 disk, it takes 21 minutes to do the same.

I can't find any installation to reproduce the good performance I get on the W12.

Tomasz Dubiel

unread,
Nov 16, 2025, 11:12:26 AMNov 16
to firebird...@googlegroups.com
Hello.
Try to do a .bat file, create a task in Task Scheduler, export it, edit the xml file to set priority 4, import it back and try to run it from Task Scheduler. Will it run faster? 
Best regards.

--
Support the ongoing development of Firebird! Consider donating to the Firebird Foundation and help ensure its future. Every contribution makes a difference. Learn more and donate here:
https://www.firebirdsql.org/donate
---
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/firebird-support/ff88805f-173f-4f76-8ad9-b369c22f51can%40googlegroups.com.

Tim Crawford

unread,
Nov 16, 2025, 5:56:25 PMNov 16
to firebird...@googlegroups.com, Tomasz Dubiel
I have a similar result at a customer.

In my case the db is only 10-12 GB, but it takes over an hour
to complete a backup. It is being done as a scheduled task,
priority 4 which is what I used at many customers. 
All customers have the same database (though content is different)
and are using the same FB version (2.5) 
Win version varies from 2012 through 2025. 
I've not see this behaviour at any other customers.

I accidentally found that if I backed up to a different directory,
it would running something like 10x faster even though the other
directory is on the same 'drive'. 

I am assuming that parts of the virtual 'disk' are pointing to different
physical drives, perhaps one slow one is much busier with other 
applications or something, but I have never bothered to pursue it with 
the customer who manages the VM.

I find it hard to believe it has anything to do with Firebird itself.
Most curious to hear of anyone's experience and/or solutions

Mathias Pannier (unitel)

unread,
Nov 17, 2025, 2:57:18 AMNov 17
to firebird...@googlegroups.com

I don’t know if I have a similar problem.

I use Windows 11 and few months ago I noticed a performance “downgrade”. I have not found a solution, but I believe it has something todo with energy savings. On my Windows 11 Laptop in power options the mode  “High performance” is missing. And I can’t get it back (there are some hints on the web to get it back, but it does not work). But I’m sure this mode was available before.

I imagine that newer Windows versions (including server versions) are trying to save energy, and that this comes at the expense of performance.

 

Von: firebird...@googlegroups.com <firebird...@googlegroups.com> Im Auftrag von Tim Crawford
Gesendet: Sonntag, 16. November 2025 23:56
An: firebird...@googlegroups.com; Tomasz Dubiel <tkdu...@gmail.com>
Betreff: Re: [firebird-support] gbak under Win2012 vs Win2019

 

ACHTUNG: Diese E-Mail stammt von einem externen Absender. Bitte vermeiden Sie es, Anhänge oder externe Links zu öffnen.

 

ub.unitel GmbH, Schulstraße 16, 06792 Sandersdorf-Brehna
Geschaeftsfuehrung Klaus Richter, Olaf Meyer
Amtsgericht Stendal
HRB 26389 FA Bitterfeld Steuernr. 116/107/08597 Ust.identNr. DE815796778
Deutsche Bank IBAN DE53 86070024 0 6143234 00
Kreissparkasse Anhalt-Bitterfeld IBAN DE69 80053722 0 3050326 82
_____________________________________________________________________
Dieses E-Mail ist nur für den Empfänger bestimmt, an den es gerichtet
ist und kann vertrauliches bzw. unter das Berufsgeheimnis fallendes
Material enthalten. Jegliche darin enthaltene Ansicht oder Meinungs-
äußerung ist die des Autors und stellt nicht notwendigerweise die
Ansicht oder Meinung von ub.unitel GmbH dar.
Sind Sie nicht der Empfänger, so haben Sie diese E-Mail irrtümlich
erhalten und jegliche Verwendung, Veröffentlichung, Weiterleitung,
Abschrift oder jeglicher Druck dieser E-Mail ist strengstens untersagt.
_____________________________________________________________________

liviuslivius

unread,
Nov 17, 2025, 3:09:20 AMNov 17
to firebird...@googlegroups.com
Or you have cpu with economy/performance cores and your backup go to eco core. But this is only a guess...


Regards,
Karol Bieniaszewski


-------- Oryginalna wiadomość --------
Od: "Mathias Pannier (unitel)" <M.Pa...@ubsysteme.de>
Data: 17.11.2025 08:57 (GMT+01:00)
Temat: AW: [firebird-support] gbak under Win2012 vs Win2019

Pieter Bas Hofstede

unread,
Nov 17, 2025, 3:12:47 AMNov 17
to firebird-support
Something like this always worked for me to make high performance (visible and) enabled:
open a terminal/cmd windows (as admin)
Execute the following command
     powercfg /s scheme_min

Op maandag 17 november 2025 om 08:57:18 UTC+1 schreef Mathias Pannier (unitel):

Pieter Bas Hofstede

unread,
Nov 17, 2025, 4:23:36 AMNov 17
to firebird-support
For investigating gbak performance, I would suggest to do a test without writing the actual backup file.
So replace the backupfilename with stdout > nul
This way you can determine if slowlyness is in the "reading source-db + create backup-format" part, or if its in "writing backup to disk" part.

Op maandag 17 november 2025 om 09:12:47 UTC+1 schreef Pieter Bas Hofstede:

Dany40

unread,
Nov 17, 2025, 9:35:16 AMNov 17
to firebird-support
I did it, but sam poor results. For example, under  Win2012 it takes 4 minutes to do this:

c:\Firebird\gbak.exe -b -g -se localhost:service_mgr E:\DATOS\12345678.fdb E:\BACKUP\12345678.fbk -user xxx -password xxx

But under Win2019, it takes 19 minutes to do the same. And I also tried adding parallel:

c:\Firebird\gbak.exe -parallel 4 -b -g -se localhost:service_mgr E:\DATOS\12345678.fdb E:\BACKUP\12345678.fbk -user xxx -password xxx

... but it also takes 19 minutes. And I also tried to run it from the task sheduler with high priority and it takes exactly the same 19 minutes.

Dimitry Sibiryakov

unread,
Nov 17, 2025, 9:40:47 AMNov 17
to firebird...@googlegroups.com
Dany40 wrote 17.11.2025 15:35:
> but it also takes 19 minutes. And I also tried to run it from the task sheduler
> with high priority and it takes exactly the same 19 minutes.

...which means that the bottleneck is most likely I/O, not CPU.

https://techcommunity.microsoft.com/discussions/windowsserver/slow-server-2019-disk-performance/653049

--
WBR, SD.

Vlad Khorsun

unread,
Nov 17, 2025, 11:27:49 AMNov 17
to firebird-support
I did it, but sam poor results. For example, under  Win2012 it takes 4 minutes to do this:

c:\Firebird\gbak.exe -b -g -se localhost:service_mgr E:\DATOS\12345678.fdb E:\BACKUP\12345678.fbk -user xxx -password xxx

But under Win2019, it takes 19 minutes to do the same. And I also tried adding parallel:

c:\Firebird\gbak.exe -parallel 4 -b -g -se localhost:service_mgr E:\DATOS\12345678.fdb E:\BACKUP\12345678.fbk -user xxx -password xxx

... but it also takes 19 minutes. And I also tried to run it from the task sheduler with high priority and it takes exactly the same 19 minutes.

  Incredible! You made a lot of useless actions instead of simple follow clear suggestion by Tomasz Tyrakowski

Regards,
Vlad
 

Dany40

unread,
Nov 17, 2025, 12:36:54 PMNov 17
to firebird-support
Let me know how do you know I didn't tried that?. I tried this 2 weeks ago. On both Windows2012 and Win2019 I get a local disk transfer rate of 300MB /s (more or less); and in both cases I need 1m 15s (more or less) to copy one 25 GB file.

But .... on my own work station I have Windows11 PRO and a local disk transfer rate of 1.4GB /s, and I need 34s to copy a 52 GB file. And on this machine I need 11 minutes using parallel 4.

Any other kind comment?

Hamish Moffatt

unread,
Nov 17, 2025, 5:49:23 PMNov 17
to firebird...@googlegroups.com
On 18/11/25 01:35, Dany40 wrote:
> c:\Firebird\gbak.exe -parallel 4 -b -g -se localhost:service_mgr
> E:\DATOS\12345678.fdb E:\BACKUP\12345678.fbk -user xxx -password xxx
>
> ... but it also takes 19 minutes. And I also tried to run it from the
> task sheduler with high priority and it takes exactly the same 19 minutes.
>

With "-se localhost:service_mgr", the Firebird service manager is doing
the backup, not gbak, so running gbak with high priority won't help.


Hamish

Dany40

unread,
Nov 18, 2025, 12:05:47 PMNov 18
to firebird-support
Good data, thank you!

Tomasz Dubiel

unread,
Nov 18, 2025, 1:02:15 PMNov 18
to firebird...@googlegroups.com
So what was the reason of slowdown? Service manager or priority? 

--
Support the ongoing development of Firebird! Consider donating to the Firebird Foundation and help ensure its future. Every contribution makes a difference. Learn more and donate here:
https://www.firebirdsql.org/donate
---
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.

Dany40

unread,
Nov 18, 2025, 1:39:14 PMNov 18
to firebird-support
Very good question. I tried direct GBAK without using the service. I shuted down the Firebird service and then I did:

c:\Firebird\gbak.exe -parallel 4 -b -g E:\DATOS\12345678.fdb E:\BACKUP\12345678.fbk -user sysdba -password masterkey

...but it taked 18 minutes instead of the 4 minutes I get under Win2012. And take in mind that under Win2012 I am not using parallel.

Alexey Kovyazin

unread,
Nov 18, 2025, 1:41:38 PMNov 18
to firebird...@googlegroups.com
Hello,

Can you please do CrystalDiskMark test (64gb size or maximum available) for both and share with us?

Regards, 
Alexey Kovyazin 




Dany40

unread,
Nov 18, 2025, 2:06:21 PMNov 18
to firebird-support
I will try. But take in mind what I answered to VLad: on both w2012 and w2019 the local transfer rate is 300mb/s more or less, and both machines are VM into the same tenant with exaclty the same parameters, only diference is the O.S.; and I also did the test in a phisic W11 machine with a local transfer rate of 1.4 GB, and the speed is similar than the w2019; both w2019 and w11 are very far to the w2012 performance for this job. 

Vlad Khorsun

unread,
Nov 18, 2025, 2:24:43 PMNov 18
to firebird-support
Let me know how do you know I didn't tried that?. I tried this 2 weeks ago. On both Windows2012 and Win2019 I get a local disk transfer rate of 300MB /s (more or less); and in both cases I need 1m 15s (more or less) to copy one 25 GB file.

  Because you ignored suggestion to do it. 

  Measure of disk transfer rate by independent, well known test, is the first thing I would run in such situation. 

  So, you measured sequential IO by big blocks, now time to measure random IO with small blocks (page size is good candidate). 
It should be done with queue depth 1 and more (4-8-16), using 1 thread and  more threads 4-8-16 (as you wish). Aleksey already 
ask you to use CrystalDiskMark for this.

  Also, it will be good to check filesystem's cluster size.
 
But .... on my own work station I have Windows11 PRO and a local disk transfer rate of 1.4GB /s, and I need 34s to copy a 52 GB file. And on this machine I need 11 minutes using parallel 4.

Any other kind comment?

  You want kind comment (whatever you mean by "kind") or efficient ? ;)

BTW, does you redirect gbak output into file or is it printed on console ? In second case it could be very slow.

Regards,
Vlad

Attila Molnár

unread,
Nov 19, 2025, 2:11:54 AMNov 19
to firebird-support
Also do not use .gdb as a database file extension, but .fdb.
.gdb  file are part of the Windows System Restore feature, and when it is ON, the RW to the files become much slower.

Tomasz Dubiel

unread,
Nov 19, 2025, 2:18:30 AMNov 19
to firebird-support
Is it really a thing?
Best regards.

Mark Rotteveel

unread,
Nov 19, 2025, 3:20:47 AMNov 19
to firebird...@googlegroups.com
On 19/11/2025 08:18, Tomasz Dubiel wrote:
> Is it really a thing?
It was in the beginning of this century, I'm not sure it still is.

Mark
--
Mark Rotteveel

Dany40

unread,
Nov 20, 2025, 10:51:02 AM (13 days ago) Nov 20
to firebird-support
 /// So, you measured sequential IO by big blocks, now time to measure random IO with small blocks (page size is good candidate)

Yes. this is the point. My test today was over a Windows 11 Pro running on a 13th Gen Intel(R) Core(TM) i9-13900 (2.00 GHz) with 32,0 GB (31,8 GB RAM), and a M2 disk running local and direct gbak for a 50 GB database:

When fdb page size is 4kb: 20 minutes
When fdb page size is 8kb: 5 minutes

Regards.
Reply all
Reply to author
Forward
0 new messages