Server is laag?

Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    Apprentice flyings is offline
    MemberRank
    Nov 2012 Join Date
    22Posts

    Re: Server is laag?

    Yea thes lag was by my pc cause my ram its low and processor .. thats was lagy my server but i goin buy new pc with high ram+processor

  2. #17
    Member 13reak is offline
    MemberRank
    Mar 2013 Join Date
    76Posts

    Re: Server is laag?

    Quote Originally Posted by ToF View Post
    mainsvr does only support two threads, which means it does not support more than two cpu cores ^^
    Nope, you can change the max. thread amount in the config. BUT even if you change it to 20 or even more, it won't change the fact that all monsters use the same thread and that can cause a huge lagg...Anyways, when I said it doesn't matter what hardware you have, I meant that you have atleast a dual/quad core with 4gb+ ram. Not a paper egy pc with a single core, 2300 mhz and 1gb ram.

  3. #18
    Quitted MadKnight is offline
    MemberRank
    Feb 2012 Join Date
    Planet VegetaLocation
    443Posts

    Re: Server is laag?

    13reak true. The Threads from the Config are IOThreads, so you can maybe speed up your Server if you have many Players, but one of the main CPU Usage Problem is, that Kal uses only one core / thread for the Monster Tick function.

    I guess that the Monster Count on Mainserver was much lower many years ago, when the Serverfiles we used was created, so that this wasnt a Problem. But now many People use 10.000 Monster + wich can be handled only via one single Thread.
    My Idea:


    Orig:
    Code:
    void __thiscall CMonsterObject__OnTimer(int this, int a2)
    {
      int v2; // ST18_4@9
      int v3; // ST10_4@15
      int v4; // [sp+4h] [bp-1Ch]@1
      int v5; // [sp+Ch] [bp-14h]@13
      int v6; // [sp+14h] [bp-Ch]@7
      int v7; // [sp+18h] [bp-8h]@7
      DWORD v8; // [sp+1Ch] [bp-4h]@6
    
    
      v4 = this;
      if ( a2 )
      {
        if ( a2 == 1 )
        {
          CIOCriticalSection__Enter((struct _RTL_CRITICAL_SECTION *)(this + 16));
          CIOCriticalSection__Enter((struct _RTL_CRITICAL_SECTION *)(v4 + 48));
          CLink__MoveTo((void *)(v4 + 88), v4 + 80);
          CIOCriticalSection__Leave(v4 + 48);
          v5 = *(_DWORD *)(v4 + 80);
          while ( v5 != v4 + 80 )
          {
            v3 = v5 - 428;
            v5 = *(_DWORD *)v5;
            (*(void (__thiscall **)(int))(*(_DWORD *)v3 + 208))(v3);// CMonsterTick
          }
          CIOCriticalSection__Leave(v4 + 16);
          CIOObject__AddTimer(v4, 1000, 1);
        }
      }
    Multithreaded for use with 4 Core Processor (pseudocode):
    Code:
    void MonsterThread_01(void*) // add needed Params (Pointers) here
    {
      while ( v5 != (v4 + 80 / 4) ) // Handle only 1/4 of the Monsters in this Thread, so first 25%
          {
            v3 = v5 - 428;
            v5 = *(_DWORD *)v5;
            (*(void (__thiscall **)(int))(*(_DWORD *)v3 + 208))(v3);// CMonsterTick
          }
    
    }
    
    void MonsterThread_02(void*)
    {
     // Handle 25 - 50 % Here
    }
    
    void MonsterThread_03(void*)
    {
     // Handle 50 - 75 % Here
    }
    
    void MonsterThread_04(void*)
    {
     // Handle 75 - 100 % Here
    }
    
    
    
    
    void __thiscall CMonsterObject__OnTimer(int this, int a2)
    {
      int v2; // ST18_4@9
      int v3; // ST10_4@15
      int v4; // [sp+4h] [bp-1Ch]@1
      int v5; // [sp+Ch] [bp-14h]@13
      int v6; // [sp+14h] [bp-Ch]@7
      int v7; // [sp+18h] [bp-8h]@7
      DWORD v8; // [sp+1Ch] [bp-4h]@6
    
    
      v4 = this;
      if ( a2 )
      {
        if ( a2 == 1 )
        {
          CIOCriticalSection__Enter((struct _RTL_CRITICAL_SECTION *)(this + 16));
          CIOCriticalSection__Enter((struct _RTL_CRITICAL_SECTION *)(v4 + 48));
          CLink__MoveTo((void *)(v4 + 88), v4 + 80);
          CIOCriticalSection__Leave(v4 + 48);
          v5 = *(_DWORD *)(v4 + 80);
    
          _beginthread(MonsterThread_01,0,0);
          _beginthread(MonsterThread_02,0,0);
          _beginthread(MonsterThread_03,0,0);
          _beginthread(MonsterThread_04,0,0);
        
          CIOCriticalSection__Leave(v4 + 16);
          CIOObject__AddTimer(v4, 1000, 1);
        }
      }

  4. #19
    Apprentice flyings is offline
    MemberRank
    Nov 2012 Join Date
    22Posts

    thumbs up Re: Server is laag?

    Maybe Mine Server is laag, cause i have to add more mops each room of Hondel

    There like,40x Mops Each room and them attack effect High so i think my server is lag by these mops... already try to go hondel at thes area i got more laag. by mops but i dont know that, lag

    by them or not

    Thanks

  5. #20
    Valued Member Hazem Hoster is offline
    MemberRank
    Aug 2013 Join Date
    TheShawshankLocation
    122Posts

    Re: Server is laag?

    Quote Originally Posted by flyings View Post
    Maybe Mine Server is laag, cause i have to add more mops each room of Hondel

    There like,40x Mops Each room and them attack effect High so i think my server is lag by these mops... already try to go hondel at thes area i got more laag. by mops but i dont know that, lag

    by them or not

    Thanks
    The lag is definitely coming from the effects ^^

  6. #21
    off@kal. - on@gw2/d3 :) TranX1337 is offline
    MemberRank
    May 2009 Join Date
    GermanyLocation
    776Posts

    Re: Server is laag?

    KalOnline developet for one CPU-Sockel, i made this .exe long time ago (is nothing special is just that peoples doesnt have to change the sockel-use)

    it solve some ingame-client laggs...

    (works only with the newst engine)

    DLLINK: https://mega.co.nz/#!0AZxXTRS!Od2sa2...DxSi4HUKLeZyTY

  7. #22
    Apprentice flyings is offline
    MemberRank
    Nov 2012 Join Date
    22Posts

    Re: Server is laag?

    Thank TranX



Page 2 of 2 FirstFirst 12

Advertisement