Jump to content
Sign in to follow this  
DancZer

Why do we have such a low FPS in multiplayer(MP performance vs SP performance)

Recommended Posts

If you get bored just discussing getting better performance, jump on and get your hands dirty.

Just bare in mind they have been doing this exercise for well over a year with no real results. We provided detailed analysis of a 35 player game that had fps dropping into the 20 fps range and they didn't do a thing with that information, not a thing. We try and arrange getting captureFrame reintroduced into development so we can do it again and get no response.

These servers are there to give the impression that they are willing to do something about performance, not to actually do something about it. When we first were showing performance problems in Alpha it was apparent they appeared in single player as well. You didn't need multiplayer to break the frame rate, the single player showed some of the worst performance possible in the game. Yet there they were trying to setup servers and do this when if they just played the single player they could see the poor frame rate for themselves reliably and repeatable.

So I am sorry that people don't get this yet, but its simply untrue that BIS has any interest in fixing the issues with this game. They just aren't ever going to do so. The evidence is that after a year and a half performance is basically the same as it was on the very first release, there is minimal improvements. They have ignored community input and failed to give us the tools to fix the script performance that could be contributing. In the end its a waste of time going onto these servers and its a waste of time trying to contact BIS about the issues. They couldn't care less, they already got your money.

Share this post


Link to post
Share on other sites

I agree @BrightCnadle that the past optimization attempts didn't really work. It makes you literally quit the game because unless you're throttling an I7 at 4.0GHZ (in layman's terms, a much faster CPU), you won't be playable on those servers. Obviously they would like to fix the issue, and they are now working on it more. However, the fact they claimed FPS improvements in the recent past and absolutely nothing changed for people like us is kind of a let-down to say the least.

Edited by CockSalad

Share this post


Link to post
Share on other sites

I can confirm that 1.34 patch made my fps in mp real bad. I lost about 10fps in mp, went from 30-40fps

to 20-30fps and that was under the playable limit for me. So havnt really played much since 1.34. But

1.36 is very close and they worked on the issue there so my hopes are high for this patch.

Share this post


Link to post
Share on other sites

The problem is in the unoptimized large-scale high-number-operations missions in MP, not BIS lack of effort itself.

If you don't get overboard with function calls, parameter passes, returns, etc., it should be pretty much fine.

Share this post


Link to post
Share on other sites

The causes of fps loss are:

(Assuming you don't overload your system with gfx settings being too high)

- High number of AI units: soldiers/vehicles etc. (Unlikely this can be optimized much more)

- MP net code is the big problem. Since fps is good when playing SP its obviously a problem with the net code between clients and server in MP.

Especially bad with poorly optimised missions with no garbage collection (cleaning dead/wrecks) and many scripts etc.

So hopefully BIS can improve the net code somehow.

Edited by EDcase

Share this post


Link to post
Share on other sites
The causes of fps loss are:

(Assuming you don't overload your system with gfx settings being too high)

- High number of AI units: soldiers/vehicles etc. (Unlikely this can be optimized much more)

- MP net code is the big problem. Since fps is good when playing SP its obviously a problem with the net code between clients and server in MP.

Especially bad with poorly optimized missions with no garbage collection (cleaning dead/wrecks) and many scripts etc.

So hopefully BIS can improve the net code somehow.

Don't forget memory leak..my fps got cut in half after 15 minutes of playing..looking at the ground and sky also didn't bring the lost fps back

Share this post


Link to post
Share on other sites
Don't forget memory leak..my fps got cut in half after 15 minutes of playing..looking at the ground and sky also didn't bring the lost fps back

Do you get that in SP or MP?

Its more likely the mentioned unoptimised mission spawning AI and creating clutter (bodies/wrecks etc)

Also missions with multiple contact points where players engage AI in several parts of the map could create too many AI.

Edited by EDcase

Share this post


Link to post
Share on other sites

There is definitely something bad in MP, but BI has servers which collect data and they analyze it. We just have to play on those servers. That's how we can help ourself and BI too.

Sometimes there are only few people on these servers and others are full. I've talked about KotH servers of course.

Play on CIMERIA servers, that's how you help. Without testing and profiling is hard do to any optimization.

Share this post


Link to post
Share on other sites

I tried the chimera server with 90+ players in it.it lags as hell..I'm at the base and still get low fps..gfx setting at min with 500 draw distance..when I'm at the capture zone I get 20 fps..

Share this post


Link to post
Share on other sites

Dwarden, I know BIS is profiling servers for improving server performance, but is there any profiling being done for clients to improve client FPS? After all, those are not necessarily caused by the same issues. Besides, even if the issues can't be fixed, they should at least be announced so that mission makers can avoid them to the best of their abilities. Without profiling, one can only guess which portion/aspect of his mission is causing the FPS to drop, or if he's lucky find out through trial and error.

For now the only reliable performance I could get is in missions that delete and reset absolutely everything in a relatively high frequency (DTAS for PvP with round-based and deleting all left-over objects every 10-minute round, or MCC COOP with restarting the mission once the previous mission is complete and only spawning the minimum necessary AI for the mission).

Share this post


Link to post
Share on other sites
Dwarden, I know BIS is profiling servers for improving server performance, but is there any profiling being done for clients to improve client FPS? After all, those are not necessarily caused by the same issues. Besides, even if the issues can't be fixed, they should at least be announced so that mission makers can avoid them to the best of their abilities. Without profiling, one can only guess which portion/aspect of his mission is causing the FPS to drop, or if he's lucky find out through trial and error.

For now the only reliable performance I could get is in missions that delete and reset absolutely everything in a relatively high frequency (DTAS for PvP with round-based and deleting all left-over objects every 10-minute round, or MCC COOP with restarting the mission once the previous mission is complete and only spawning the minimum necessary AI for the mission).

Client FPS is throttled by server in multiplayer. Mostly server FPS but also host bandwidth plays a role.

Boost server FPS = client fps increases.

attempts to boost client FPS irrespective of server FPS = almost futile.

Share this post


Link to post
Share on other sites

Boost server FPS = client fps increases.

I thought the server fps affects the client fps only when it drops really low, like under 5fps.

Share this post


Link to post
Share on other sites
Client FPS is throttled by server in multiplayer. Mostly server FPS but also host bandwidth plays a role.

Boost server FPS = client fps increases.

attempts to boost client FPS irrespective of server FPS = almost futile.

your wrong

Share this post


Link to post
Share on other sites
your wrong

Prove it with facts.If not it just word against his...

Share this post


Link to post
Share on other sites

I would be so grateful for a command that returns the current FPS of a client. Had to optimize so many missions just in Arma 2.

- As said before one of the most common mistakes is that AI is being used too often.

- Another reason is careless group handling, people spawn units or create groups (gangs, companies, squads or whatever) and then may delete the units but not the group itself on the owning machine what i.e. for arma 2 caused bird slots - normally a group should be removed automatically when it's empty but that's mostly not the case.

- Grass, never underestimate the grass (change terrain grid).

- Filebased Databases - The worst of everything, at a specific filesize arma will wait forever to get the results. Remember the times when the first saving systems for unmodded servers came out? Use server-based databases or some sort memcache instead.

- Let the clients do the work! The server is busy enough. My experience with Life Servers has shown me that such things as loops (i.e. for votings or events) are better handled by the clients than by the server. The server often operates hours in the past (just can check it by using the time command on clients and server comparing the results) what i.e. results in a falsification of commands like "sleep".

- Outsourcing. Calling functions from DLLs in most cases is not as performant as handling code in SQF yet instead of ingame countless GUIs from X clients it's recommendable to i.e. solve this via Websites letting PHP/ASP handling the greater work passing the results to the server from time to time.

- use switch case instead of if

- Broadcasting. Don't just use "publicVariable" with something like "if(isServer) then { ... };" or "if(player == civXYZ) then { ... };". publicVariableClient or publicVariableServer are totally sufficient for such things.

- Use "isServer" or "isDedicated" !!!!! seeing missions running code (files & loops) on the server that is meant for clients only is a waste of resources (happens far too often)

- Try to sync the FPS between the clients & clients by adjusting their settings - that's why I want the FPS command

- Add Ping limits (waiting for slow clients isn't fun)

- Delete unused mapobjects after some time, this includes corpses and vehicles

- Avoid explosions

- Don't overdo it with weather effects

- Get rid of script kiddies (wannabe hackers) on your server ;)

- Not too much Zeus spawned stuff

Consider https://community.bistudio.com/wiki/Code_Optimisation

That's all I can remember atm. will expand the list later

Edited by Armitxes

Share this post


Link to post
Share on other sites

Is there any way for clients to know the server FPS or have it displayed easily? This would help, I think, in knowing when a server was overloaded for most players.

Share this post


Link to post
Share on other sites
I would be so grateful for a command that returns the current FPS of a client. Had to optimize so many missions just in Arma 2.

Would diag_fps work?

Is there any way for clients to know the server FPS or have it displayed easily? This would help, I think, in knowing when a server was overloaded for most players.

I've seen it as a system chat message on some servers. Would be nice to see it used more often.

Edited by Greenfist

Share this post


Link to post
Share on other sites
Would diag_fps work?

damn, that diag_ infront misleaded me. Of course it works, I didn't ever use that command as I thought it would only log the FPS in the .RPT File -.-'

Is there any way for clients to know the server FPS or have it displayed easily? This would help, I think, in knowing when a server was overloaded for most players.

Sure, on demand just execute something like

svrFPS = diag_fps; publicVariable "svrFPS";

or via DevConsole

("if (isServer) then { svrFPS = diag_fps; publicVariable ""svrFPS""; };") call broadcast;

on the server.

on the clients you then simply output the variable svrFPS.

hintSilent str(svrFPS);

and you'd know the recent average server fps. Just don't do it too often as it costs traffic ;)

Share this post


Link to post
Share on other sites
I always hear that there is only bad MP fps because everyone can host missions on his bad PC. But why isn't it better when I play servers with high performance? And why should I get low FPS at all??

In theory, my PC only has to receive the positions of other players and AI and place them, and send the server the position of my own player. How should this consume more performance than when I play a SP mission with ton of AI??

My PC should not care if there are many AI in a mission, because my PC does not have to calculate anything AI related. This is the job of the server. A client's PC just places the units then, nothing else. The only thing that a client PC would have to do is interpolation of the position data, since you don't receive new packages from the server every frame. And to avoid stuttering AI and players the client has to interpolate their movement, which should not consume as much performance as calculating AI.

Something is definetly wrong with the whole netcode/multiplayer code. But BIS don't care. Since 13 years.

I lol'd so hard when i read that. Its a lot more complicated then that.....

Share this post


Link to post
Share on other sites
snip
Thanks.

Unfortunately, that requires the scenario makers to include it.

Share this post


Link to post
Share on other sites

a question to the devs:

will the MP performance/FPS increase also affect SP ? means: if we get more FPS/Performance in MP, we will get more in SP ?

Share this post


Link to post
Share on other sites

averageFPS = 50;

if (isServer) then
{
_fpsArraySize = 10;
_minimumFPS = 20;
_fpsArray = [];
for "_i" from 0 to (_fpsArraySize - 1) do
{
	_fpsArray set [_i, 50];
};
_fpsArrayCurrentIndex = 0;
while {true} do
{
	sleep 1;
	_fpsSum = 0;
	_fpsCount = 0;
	{
		_fpsSum = _fpsSum + _x;
		_fpsCount = _fpsCount + 1;
	} forEach _fpsArray;
	averageFPS = _fpsSum / _fpsCount;

	if (averageFPS < _minimumFPS) then
	{
		publicVariable "averageFPS";
		sleep 30;
	};

	_fpsArray set [_fpsArrayCurrentIndex, diag_fps];
	_fpsArrayCurrentIndex = _fpsArrayCurrentIndex + 1;
	if (_fpsArrayCurrentIndex >= _fpsArraySize) then
	{
		_fpsArrayCurrentIndex = 0;
	};
};
}
else
{
averageFPSWarningGiven = false;

averageFPSPVHandler =
{
	private ["_str"];

	_str = format [localize "STR_WarningPoorServerPerformance", round averageFPS];
	systemChat _str;
	hint _str;
	if (!averageFPSWarningGiven) then
	{
		averageFPSWarningGiven = true;
		[_str] spawn
		{
			waitUntil {!(isNull player)};
			sleep 1;
			hintC (_this select 0);
		};
	};
};

"averageFPS" addPublicVariableEventHandler
{
	[] call averageFPSPVHandler;
};
};

Something like that will do the job, but needs to be implemented in the mission. It will get the client to display a message if the server FPS is too low. Currently it is made to only display once to avoid spam in case of constantly poor server FPS (which is usually the case with poorly-performing servers), but can easily be changed to display the message if it hadn't been displayed for the last X seconds.

I use that in my DTAS mission so that people can know if something is not working right due to server FPS being too low (for example, game timer acting funny which can happen if server FPS is very low since the timer is synchronized from server).

If you want the full implementation feel free to take a look at the mission PBO, but the main logic can be found in the code above.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×