Menu

#456 Firebird 3 + TZIBEventAlerter - Huge load CPU

8.0-Beta
closed
Bug Report
2021-04-30
2020-11-06
sundoctor
No

Hi!
r7039 (and earlier) - When I use simple FB events with code such as:

var FEventAlerter:TZIBEventAlerter;
...
      FEventAlerter.Connection:=FDBConnection;
      FEventAlerter.RegisterEvents; { 2 user events only }
      FEventAlerter.Registered:=true; 

the CPU load grows up on 10-15% for one application instance.
But my application does not do any work at all! Empty main form is on the screen and that is all!
The huge CPU load is from the void.
Several (5-6) application instances give me 100% CPU load.

I think the code for this component is very heavy and not optimal. Please check.

Regards,
Igor

Discussion

  • sundoctor

    sundoctor - 2020-11-06
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -10,7 +10,7 @@
     ~~~
    
     the CPU load grows up  on 10-15% for one application instance.
    -But my application does not any work at all! Empty main form is on the screen and that is all!
    +But my application does not do any work at all! Empty main form is on the screen and that is all!
     The huge CPU load is from the void.
     Several (5-6) application instances give me 100% CPU load.
    
     
  • EgonHugeist

    EgonHugeist - 2020-12-08

    Sorry for the delay, Igor.
    Hope 7144 will downgrade the CPU usage to test if an async event is submitted?

     

    Last edit: EgonHugeist 2020-12-08
  • EgonHugeist

    EgonHugeist - 2021-01-08

    Ping.. Any news on this?

     
  • sundoctor

    sundoctor - 2021-01-11

    Hi! r7211 - problem is still here. 25% CPU load (AMD FX8120) from one application instance.

     
  • EgonHugeist

    EgonHugeist - 2021-02-27

    Hi Igor, can you prepare a testcase which shows me what's going on? OTH have to pass by now.
    Regards, Michael

     
  • sundoctor

    sundoctor - 2021-03-02

    Ok. I'll try

     
  • EgonHugeist

    EgonHugeist - 2021-04-17

    Hi Igor,
    can you check r7458

    i have rewitten the whole allerter API. Does it resolve your issue?
    Regards, Michael

     
  • EgonHugeist

    EgonHugeist - 2021-04-19
    • assigned_to: EgonHugeist
     
  • EgonHugeist

    EgonHugeist - 2021-04-19

    Hello Igor, please update to min r7462

    Might be possible you need to remove the component and add it again. Regards, Michael

     
  • sundoctor

    sundoctor - 2021-04-19

    r7463. I remove the component and add it again. Two screenshots are in attach - with and without FBAlerter

     
  • sundoctor

    sundoctor - 2021-04-19

    It seems the situation with cpu load and EventAlerter is a bit better, but it is noticable yet

     
  • EgonHugeist

    EgonHugeist - 2021-04-20

    Hmm i can't see a possible zeos regression anymore. I did remove all threads from the firebird event alerter. There is no loop in zeos code which could cause such high cpu load.

    Just some links i found on searching for "firebird events high cpu load" on google:
    high cpu load
    high cpu load
    high cpu load of an evetnprocessor which was equal to old code

    Do you use the standart port 3050? Is the firewall prepared for the port? Did you install FB manually?

     
  • sundoctor

    sundoctor - 2021-04-20

    I set DummyPacketInterval=30. Port 3050. Firewall is off. Win7x64. No changes.
    I'll check your links and try to some more variants.

     
  • sundoctor

    sundoctor - 2021-04-28

    It seems that setting

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\KeepAliveTime=30000 (DWORD)

    solves the problem with the EventAlerter load.

    It's important...

     
  • EgonHugeist

    EgonHugeist - 2021-04-30

    Nice catch, Igor! Is there an article we can use as reference for our knowledge base?
    Closed meanwhile -> not a zeos bug.
    Regards, Michael

     
  • EgonHugeist

    EgonHugeist - 2021-04-30
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB