Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU usage connect to Firebird 3 database using Firebird 4 Classic and SuperClassic service #7535

Closed
ccy opened this issue Apr 3, 2023 · 2 comments

Comments

@ccy
Copy link

ccy commented Apr 3, 2023

I configure Firebird-4.0.2.2816-0-Win32 service:

  • Copy engine12.dll from Firebird 3.0.10 to Firebird 4.0.2\plugins
  • Copy msvcr100.dll and msvcp100.dll from Firebird 3.0.10 to Firebird 4.0.2
  • Add Engine12 support to firebird.conf:
    Providers = Remote,Engine13,Engine12,Loopback
  • Set ServerMode to Classic or SuperClassic in firebird.conf.

I prepare 2 databases: fb30.fdb and fb40.fdb to try.

I open 3 cmd console and use isql to establish connection to fb40.fdb:

isql -u sysdba -p masterkey inet://127.0.0.1/c:/fb40.fdb

All 3 isql connections work and CPU load for firebird.exe processes is 0%. This is expected as no processing load yet.

I close all the isql connections and connect with fb30.fdb:

isql -u sysdba -p masterkey inet://127.0.0.1/c:/fb30.fdb

This time I can notice the cpu usage of firebird.exe process boost up. The more connection I open to fb30.fdb, the CPU load is higher.

This happen to Firebird 4.0 using SuperClassic and Classic mode. It doesn't happen to Super mode.

@hvlad
Copy link
Member

hvlad commented Apr 6, 2023

Confirmed. The reason is that both engines uses same names for the named Windows Events.

@hvlad hvlad self-assigned this Apr 6, 2023
hvlad added a commit that referenced this issue Apr 6, 2023
… Firebird 4 Classic and SuperClassic service
hvlad added a commit that referenced this issue Apr 7, 2023
… objects used in server-to-server IPC.

Backport fix for bug #7535 : High CPU usage connect to Firebird 3 database using Firebird 4 Classic and SuperClassic service.
Implement new setting UseLegacyKernelObjectsNames for backward compatibility.
Preserve Win32 build compatibility with WinXP.
@hvlad
Copy link
Member

hvlad commented Apr 10, 2023

Should be fixed now, check next snapshot build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants