Jump to content

[Mod][Beta] Disable faction wars (improve server performance)


Hammelpilaw

Recommended Posts

Hi,

 

this small mod disables the initialization of all faction wars. Already running wars keep running til attackers get killed, but no new war will start.

 

Only tested with Avorion >= 0.12 yet. Use at own risk in lower versions. A version for Avorion 0.11.x maybe coming soon if requested.

 

What is the reason I'm releasing this mod?

If you play offline, wars between factions are a part of the game. But on a server they just could kill the game by causing huge lags on the whole server.

 

 

How to stop already running wars?

 

If you use Avorion >= 0.12 you could leave a ship in a sector with faction war and jump out, to keep the sector active and wait outside until the defenders win. You could also order your captain to attack the defenders. These wars only causes lags, when a player is IN the sector, but not when an empty player ship/station keeps the sector active.

disableFactionWars-1.0.zip

Link to comment
Share on other sites

This does work, as ive used something similiar on my server.

However wouldn't this be better:

 

function InitFactionWar.tryStartBattle()
terminate()
...
end

 

or if you wish to undu this change in the future:

 

function InitFactionWar.tryStartBattle()
do return end
...
end

 

the first option removes the script from the sector, freeing up both resources and stopping further calculation

the second option only stops further calculation

 

P.S. Thank you for posting this I know allot of people have complained about this exact issue. Personally I just never thought to post anything for it.

Link to comment
Share on other sites

Hurm - We sorta like sitting back on these faction wars and letting the AI duke it out... but I think disabling would be better as my server does struggle tad when this is happening.

 

Don't really see a benefit to leaving the wars running at this point, this doesn't disable the pirates or aliens attack does it?

 

I'm actually about to get more CPU on my server to handle the faction wars better as it is...

Link to comment
Share on other sites

This does work, as ive used something similiar on my server.

However wouldn't this be better:

 

function InitFactionWar.tryStartBattle()
terminate()
...
end

 

or if you wish to undu this change in the future:

 

function InitFactionWar.tryStartBattle()
do return end
...
end

 

First one isn't the nice way I think imo, do you exactly know which scripts it terminates?

The 2nd one is similar to my script, its only a few less characters. But since this does not touch server performance at all it does not care (watch below). Maybe I'll do the 2nd if there will be any next version, thanks.

 

 

Unfortunetly adding more cpu wont increase the performance of the server

see: http://www.avorion.net/forum/index.php/topic,3448.0.html

 

Thats true, but the real reason for performance issues is only the network:

 

http://www.avorion.net/forum/index.php/topic,3578.0.html

 

You can also test by the way i told you to finish faction wars (sadly it is not possible to stop them by scripts):

 

leave a ship in a sector with faction war and jump out, to keep the sector active and wait outside until the defenders win.

 

The sector is still active and calculated by the cpu. But the data must no longer be sent to a client, wich frees network ressources, the lags will stop.

Link to comment
Share on other sites

First one isn't the nice way I think imo, do you exactly know which scripts it terminates?

it deletes initfactionwars.lua from the sector. Its a permanent change which we dont  do, just wanted to list it for everyone.

 

Secondly if you dont stop the script prior to the loop inside the script it will use more resources them if you were to stop it prior. Now those resources are probably so small to barely mention but good practice to stop prior to loop if your not going to be using the script anyways.

 

Unfortunately  your missing the fact that the server will throttle down update ticks on sectors with no players in it.  which means lower ticks = less lag. Also to further show that network speed doesn't effect lag, The Rusty server is actually running 2 Avorion servers on the same machine simultaneously, and lag on one server DOES NOT effect the other server. As Koon himself has said its all about the update to tick for each script, per sector. If a sector takes to long to calculate its shit, it will slow down the entire server.  removing all players from a faction wars sector will force the server to throttle that sector down to only a few ticks per second depending on your server config.

Link to comment
Share on other sites

But how comes these problems only exist online? Performance is very great when you play offline as you can see in the topic:

 

Thats true, but the real reason for performance issues is only the network:

 

http://www.avorion.net/forum/index.php/topic,3578.0.html

 

Try this by your own: find a sector with faction wars wich causes huge lags. Then download the galaxy and try offline. The lags will be gone.

But why when its not the network?

 

 

Also to further show that network speed doesn't effect lag, The Rusty server is actually running 2 Avorion servers on the same machine simultaneously, and lag on one server DOES NOT effect the other server.

 

When we run other games beside Avorion on our server, the other games get performance problems too when someone jumps into a faction war.

Link to comment
Share on other sites

I applied this but was getting a console error of some 'illegal spaces' or similar. So took it out for now.

I'll have to re-apply it later when everyone's off and review the log again for the specific error that came up.

Link to comment
Share on other sites

But how comes these problems only exist online? Performance is very great when you play offline as you can see in the topic:

 

Thats true, but the real reason for performance issues is only the network:

 

http://www.avorion.net/forum/index.php/topic,3578.0.html

 

Try this by your own: find a sector with faction wars wich causes huge lags. Then download the galaxy and try offline. The lags will be gone.

But why when its not the network?

 

 

Also to further show that network speed doesn't effect lag, The Rusty server is actually running 2 Avorion servers on the same machine simultaneously, and lag on one server DOES NOT effect the other server.

 

When we run other games beside Avorion on our server, the other games get performance problems too when someone jumps into a faction war.

 

perhaps your server is having issues, to say that the its the games fault because of your test, is not conclusive enough to validate your theory. My server doesn't have any network lagging issues and we run multiple servers on the same machine.  What we have noticed is Client lag due to higher ping rates.  Remember a player can experience lag seperatly from what the server and others on the server are experiencing.

 

Are you measuring server load? bandwidth? player count? cpu usage? memory usage? latency?

and when i say measuring are you logging all this data and comparing it against several situations across a long period of time? To take one situation, then change the environment and say the problem is this, is not conclusive.

I know on my part we keep tracking data on almost all of these plus more for over the past 3 months, with active loging over the past 10 days. all of which is graphed out into a web page for comparison.

 

Im not trying to say everything your saying is wrong, nor me 100% right. im just saying we have to be open minded and accept the fact that it could be 1 or the other or maybe a combination of both.

Link to comment
Share on other sites

Are you measuring server load? bandwidth? player count? cpu usage? memory usage? latency?

and when i say measuring are you logging all this data and comparing it against several situations across a long period of time? To take one situation, then change the environment and say the problem is this, is not conclusive.

I know on my part we keep tracking data on almost all of these plus more for over the past 3 months, with active loging over the past 10 days. all of which is graphed out into a web page for comparison.

 

Im not trying to say everything your saying is wrong, nor me 100% right. im just saying we have to be open minded and accept the fact that it could be 1 or the other or maybe a combination of both.

 

It's true, I only took one single situation in my tests. But I saw the same issues on all servers I played on. You always get huge lags in faction wars, and maybe if you kill the boss, also a lot of other people are talking about similar problems. That means there are huge performance problems on (almost) all servers, or at least on a lot of servers.

 

But who experienced the same issues when playing offline? This seems to work fine, even if the hardware is worse then the hardware of the lagging server. When I reproduced situations on my pc, wich caused huge lags on a server, it worked well, although the client took most of my hardware ressources. What is the reason that you do not get any problem when playing offline?

 

 

Ofc im not saying too that its wrong what you say. Thats why we are here, we want to share our experience to improve the game  :)

I also don't want to to say that this is the only problem. Yes i know, i said in the first post of the network performance topic:

 

All the performance issues are a result of networking problems.

 

This was very bad worded... and it's not true that it is the only problem. But I'm sure it is a problem.

Link to comment
Share on other sites

  • 2 weeks later...

Is there a walk through on this mod on how to install it? Running a server via ping perfect, i thought it was installed but new faction battles still appearing i did something wrong here...?

 

Extract the content of "disableFactionWars-1.0" directory into Avorion server folder. One file in a subdirectory of "data" should be overwritten if you did well.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...