Jump to content
  • 0

MAX_EVENTQUEUE and Server Optimization


spangler

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  02/24/17
  • Last Seen:  

Hi guys! I had several question regarding eventqueue and its impact to server performance.

1. By default MAX_EVENTQUEUE is set on 2, I was wondering how big is the optimum value EVENTQUEUE can actually hold?

2. If you increase the value of EVENTQUEUE setting, will it impact server performance? )such as lag, memory, etc)

3. How to optimize server performance to accommodate 500+ people? In which part of sources or script can I optimized this 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 2

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3124
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

From what i understand, it's optimum value is 2. I personally have set mine to 20 as i have a lot of OnPCLoginEvent scripts which would ordinarily exceed the queue value.

There's no magic settings to "optimize performance". The more scripts you run on a server, the more resources it will use. The more players you have connected, the more scripts you have running.

The best answer i can give you for number 3 though, is to avoid scripts that use timers/loops. Scripts that use static data perform better than scripts that use dynamic data. Keep your variable usage to a minimum by using bitmasked values. Event scripts that spawn x amount of monsters in a specific location at x times of the day are discouraged, as that will create your resource bottlenecks.. but if you know where they are, then you can do things to combat them :)

  • Upvote 1
  • Like 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  02/24/17
  • Last Seen:  

Thanks that really do answers a lot!

Wow didn't expect bottlenecks on that kind of monster spawn script though, can't say true enough, now I do know where should I optimize my server script.

If anyone can have different opinion or fact , you are welcome to reply.

Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3124
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

It's not because it's a monster script, it's because it's spawning monsters to a map and most likely all have attached scripts and a timer. It can cause small amounts of network latency and increases the ram and cpu usage of the map server. It's not a big issue by any stretch, it's just something to remember when creating scripts for high population servers.

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...