Jump to content
  • 0

How a server has lag problem ?


Psyche

Question


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   6
  • Joined:  03/12/13
  • Last Seen:  

Hi,

I am handle a server which has 13~24ms ping, with memory takes about 40%. But in game (almost War of Emperium) is so lag (spike).

How can it possible? my suspection is :

1. NPC Script i have made take a lot of functions?

2. Over mob spawn in 1 map (i make my server mob spawn 1.5x, so there is a over 100 mobs in a map)

3. Skill Effect??

4. Server (VPS) problem?? Wether has stable ping and 40% memory, it is possible to cause the lag?

 

Please help solving my problem x_x

Edited by Psyche
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 3

  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  1096
  • Reputation:   344
  • Joined:  02/26/12
  • Last Seen:  

Your problem is not new. A problem with lags can be divided into two global parts, then by extra sub-parts of each global part.

Server-side problems

Explained in order and priority what you need to check first, step by step, and what affects more.

  1. Overloaded node (dedicated server) where you are hosting your VPS. You can see good CPU, Good Memory, but you always will lag even if your resource usage too low. Because you will not see how others clients of a hosting company utilize resources. I can write a very long wall of text about a hosting company and how they are cheating to their customers with different virtualizations (OpenVZ for example), or constant network issues (available well-known list of global networks which is very poor). Usually switching to a new reputable provider with an average price at the market enough for achieving stable server without lags.
  2. CPU. *athena emulators are single-thread apps. That means you must have always as powerful single core performance as you can. A lot of providers cheating even about what CPU they are using by closing access to cpuinfo and other parts of a Linux hardware to identify what a processor used at a node. Your rule is simple: stick only to e5, e3 (for example e3-1230v4, 1230v5, 1230v6), or even for Intel i7 cores at least 3-4-5-6-7 generation). Also for you very important good clock speed, you need at least 2.5Ghz for running smoothly a server at WoE with up to 400 players online. If you have bigger online, you need better CPU core (and of course I'm talking about fair providers which give you guarantee resources, or at least not doing overloading to their nodes by hosting a lot bigger amount of customers that host node can manage). Stay away from any atoms, any Celeron, opetrons, 1, 2, 3 generation of i3, i5, i7 processors, e3, e5, e7. And of course stay far away from any AMD processors, they are much worse than Intel's one. And for sure such processors will be way cheaper than normal productive one.
  3. Virtualization. Your ideal solution will be a dedicated server without any virtualization. But it's wasting resources and in many cases money. Average price for dedi server on providers with good price/performance rate starts from 40-50$. And you must follow requirements above and below to hardware, and you will find that not too much providers offer great prices for great resources. Usually, you will see tons of crap for that price, but it possible to achieve something good. But if back to virtualization, and if you can't buy dedi, you must stick only with KVM, VMWare virtualizations only. I wont to explain in a very big wall of text with details why any other virtualization is crap but stick only to these two. Stay away from any OpenVZ, and Xen, and you will be fine.
  4. Storage. You must know that network it's about opening FILES on your file system which called "sockets" where data were written and from where it taken. It's all about files. If you have a big amount of players, and a lot of connections and packets, that means a lot of I/O operations happened. That means you must always be hosted on any SSD/NVMe drive.  SSD has much higher I/O rate. But again, remember always a simple thing, that providers have a very big competitive market where "price per point' wins. That means they will try to minimize their price as maximum as they can. For example by offering SSD, yes, it's SSD, but the cheapest model from a no-name company with very low IO rate (yea, it will be higher than at HDD, but not so good as it excepted or can be).  First, what you need to do if you will buy VPS or Dedi it's testing disk drive system for IOp's and google good average amount for it. It will help you very much for your MySQL, for your connections, for most everything. 
  5. Network. DDoS protection it's must  have option if you wish to survive.  But the problem of DDoS protection in next: - DDoS protection SHARE all their capacity between ALL customers. So all of the customers ALWAYS has the same risks for lags if some shit will happen (unexcepted big DDoS attack to some of the customer, what will affect all other clients of the same provider if they will not have enough mitigate capacity). If your server has not a big risk of DDoS attacks, stick to any provider which has "auto" sensors in detecting a DDoS attack, or with who you can manually force-enable permanently mitigation what will analyze all traffic. Why is  it important? Because you will not have many problems and downtimes at a time when you have no DDoS attacks from attackers, and if DDoS will happen, your server will just one time go down and then you will force enable protection and will wait until attacker will leave your project, and then you will manually off protection. If you think reputable providers with a lot of experience already knew what they are doing for your game server - you are very wrong.  They are tunned for most popular game projects only, and not tuned for MMOPRG where  ppps can be very different in different time zone. I have tried very big amount of providers (dozens) all of them cheap, "vip" all of them are piece of shit, and if a really hurt attack comes to your serveer only one thing is different betweeh tnem -> price for mitigation and  how many money you are  ready to spent to protect your server. If you think that some providers has "very good protection, unbypassable" be s sure you are wrong, and you did'nt saw yet at your server how can all very good protections be bypassed and your server will die. It's related to attacker only. If you will have good competition with some server what offer the same feaetures as you in one day to receive attaack what will totally block aaccess to your server. So for what need to pay more, if you can just get DDoS protection with average price and turn it on / off at a time when you need it? My main point in next - you are not able to protect your game server without big investments to the project and building a huge  network around with different routes to your server, and in 90% cases DDoS protected network will provoke lags. So for what to use it 24/7 and provoke lags for everyone, if you can turn it on in days when shit will happen?
  6. Software and kernel tuning. Usually, this is not needed if you are using latest kernel and latest versions of software. Developers knows much better then you how utilize your VPS / Dedi resources. Keep it untouched, just make sure you arae using latest versions of everything. 
  7. Rathena settings, as you see this is a latest possible reason of lags, and it's has lowest priority. Why? Because if you have loops, or even tons of problems with NPC's you will see huge  resource usage from emulator and will try to investigate and analyze where is a problem and fix it. 

 

Client-side problems

  1. RO client is highly unoptimized. And people can lag (and already lags) on top-tier PC's with i7-7700K  + GTX 1080ti. or RX580 It's normal for RO. Force people to use RCX solutions. 
  2. Cheats. with 99% chance i can guarantee that you lag at  WoE only because of cheaters at your server. Cheats provoke very high ppps to/from server. 
  3. Using problematic exes. I know only few exes which works smooth in battles like WoE, it's 2010-06-18, 2010-07-30, 2012-04-10, 2013-08-07, all other clients has different problems, even clients higher then 20131-08-07 have problems with different lags.
  4. Game protection can be a reason of lags. Yes,  you got me right. In 90% cases the problem beside cheaters is anticheat software what provoke fps, and not only lags.

 

What you need to do

Find any dedi server or good KVM / VMWare VPS with SSD, with tier1, tier2 network and good CPU. It's will be enough to be sure that the problem not at your side. Suggest your players to disable cheats,  and let them use  RCX like solutions to minize effects in the game. Switch exe to one of above, and everything will be good. Buy any system which add delays for processing actions from client-side at a server.

 

  • Upvote 3
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

May I know what is your vps spec?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   6
  • Joined:  03/12/13
  • Last Seen:  

CentOS 7 with 2gb ram

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  89
  • Reputation:   3
  • Joined:  05/05/13
  • Last Seen:  

may i ask, ragnahosting?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

9 hours ago, Psyche said:

CentOS 7 with 2gb ram

How many of your players? Normal, during woe? 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   6
  • Joined:  03/12/13
  • Last Seen:  

2 hours ago, mrlongshen said:

How many of your players? Normal, during woe? 

its about 100 players normal, 150 players during woe. in 1 castle map there is about 40 players inside.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

38 minutes ago, Psyche said:

its about 100 players normal, 150 players during woe. in 1 castle map there is about 40 players inside.

Is all player feel the lag too? 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   6
  • Joined:  03/12/13
  • Last Seen:  

1 hour ago, mrlongshen said:

Is all player feel the lag too? 

Yes.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   6
  • Joined:  03/12/13
  • Last Seen:  

2 hours ago, Anacondaqq said:

problem not at your side. Suggest your players to disable cheats,  and let them use  RCX like solutions to minize effects in the game. Switch exe to one of above, and everything will be good. Buy any system which add delays for processing actions from client-side at a server.

Thankyou for your great explain !

If it really ClientSide Date,, wahhh... i just can't do anything :')

I have made a test again with my server. collectiong 30 player in pvp map, and all going smooth. and after i find this problem here, 3 topics have same problem.

 

I am thinking logicly, my maintown has 70-80 players there, and causes no lag. also PvP. so maybe the problem is in the woe controller?

if it was true its all about the server, like you suggested, maybe i will move to a better server. maybe azure can clear this x_x

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...