When does lag occur?
-
You need to define lag or what your interpretation of lag is, because people just say “lag” for anything.
If the assumption is the jumpy, or yellow icon that shows thats because of issues with packet processing.
UDP doesnt wait for the packets in order, so the server processes them as received and sends them back, when a packet is delayed, this is what causes the jumping of players. delayed packet and new location plotted and shown.
Packets being delayed can be a combination of server load - the server taking time to process, or the connection of the player, or both. Ping whilst seen as the god of everything isnt, its the latency of the connection and the loss thats as important.
When the server calculates and sends and receives packets, it takes all players in the local vicinity and returns the packet, the calculation between players is important, the more players in the local the more calcs involved. example - 10 players = 9 calculations for each packet for each player, then it needs to include the movement, firing , tracking missile etc etc.
As you can see AI, is calculation based - does it appear%, what will appear%, level, number, ship etc etc…you can follow the decision tree method it uses. then it has to calc what its doing - movement and initialise it. This is why AI is heavy on resource.
Players with crap PC;s are an influence on packet delay. crap graphics, means the card cant display fast enough, then the cpu is delayed whilst it waits for the drawing, during this its trying to process sending and recieving packets. This is why, heavy graphic intense areas will cause the player to think he’s lagging, when in fact, his pc cant cope.
Packet size has nothing to do with it neither does bandwidth.
Obviously you also have the numptys using their crappy pc’s for d/l IRC/MSN etc whilst playing the game, so their experience is poor.Avoiding lag
Only spawn the correct NPC numbers you need - if you dont need 10, dont spawn them
You can remove most of the timing issues in the encounter zones, reduce density and max battlesize
Reduce the number of NPC appearing
Reduce the encounter parameters - if you dont really need the encounter to have 6 different possible factions, reduce it to a reasonable number.
Only include dust particles if you need to and make sure that the number appearing are very low
Try and keep npc combat outside of graphically heavy nebulas, or minimise the numbers.
Keep on at the players that they run FL only on their pc when connected to your server.
try, if possible to spread the players around, this is near impossible but needs encouragement
make sure your server connection is the best you can get, im talking about the network card it has.
Make sure all your ini files are compressed, its quicker to load and read by the server. The server doesnt like reading text ini files.So it has to use up more memory to process and manage the text ini’s.Just some stuff that I hope helps some people.
-
Sry for the stupid q; but
Obviously you also have the numptys using their crappy pc’s for d/l IRC/MSN etc whilst playing the game, so their experience is poor.
Are you sure that even small Instant Messengers like ICQ, MSN, Xfire (deactivated IG-Chat), Trillian influence my PC THAT MUCH?
-
Some good points Strail, exactly what admins should be looking at when trying to reduce lag.
At NiMa we did some quite substantial changes to the server side mod (reducing npc spawns etc) to get it running at a more acceptable level. I used to reduce things even further for event’s, so I could up the npc count in the event systems etc without increasing lag too much.
Also the box owner there Mister X tested various different CPU’s types, Intel dual core, AMD 64, Xeon etc but NO CPU could perform as well as the standard 3.4GHz P4 with flserver.exe. I believe the admins at the time in 2005 tried contacting MS to get flserver source to modify. At the time when the server was upgraded then it was probably the fastest FL server around bar none. It was running an evolutions based mod with all the capships, with 50 players every day most of the day, with relatively very little lag. Of course taking into account the multi threading mods done by the guys at Hamburg City since then, W0dk4 I think? I guess it’s possible to get around this limitation in flserver.exe now.
-
I never got the multithreading patch running… everytime i used it the server got very instable
I guess its hard to get a solution for all running systems as they are pretty much different…
1 core… 2 cores… 4 cores… 32bit… 64bit… intel… amd
hard to set standards -
@ Bas - the reason so many people still play FL is that they dont have to upgrade their pc’s and there are a lot of players still on low end pc’s. When you have a low end pc and low end ram, these programmes do eat up resource and cause problems. If players have a low end pc I always advise them to open the task manager and set the priority for freelancer.exe. to high and make sure all the other programs are set to average/below average to ensure freelancer takes priority when playing.
Dont be hung up on the cpu power, a higher fsb is more important than the latest giga cpu.
The bottleneck on the fsb in and out is the issue. This is why quad core stuff is no real benefit for flserver. Whilst you can process the stuff quick you still have the bottleneck on the fsb, because the quadcores all use one fsb, not 4. So you get some benefit out of the mutithread dll from W0dk4, however, you should pay as much attention to the fsb speed as the cpu when your looking. This is why a dual core with high fsb is actually better than a quadcore (for a busy server).
-
I never got the multithreading patch running… everytime i used it the server got very instable
I guess its hard to get a solution for all running systems as they are pretty much different…
1 core… 2 cores… 4 cores… 32bit… 64bit… intel… amd
hard to set standardsI heard that from a few guys now and I also no longer recommend it due to this and a reportedly slightly different missile behaviour… though Im sceptical if that was really an issue.
Anyways, the number one bottleneck by far of the FLServer is the CPU processing power. We ran on different setups, such as putting our entire char database on a ramdisk (virtual drive on the RAM) and did not see a noticeable difference.
-
My main impressions is,
that lag is cause by any kind of ‘communication problems’
between client and server.
Based on the performance of some cheaters we found
and on hours of digging in server logs (FLHook, CD + Co)
i m convinced, that altering client files causes such problems.
The other point 4 that opinion is my own ‘cheating’.
ATM i m testing effects and verifying HPs moved a little bit,
to better fit the ship - and my chars are often a bit laggy + CTD sometimes
(while server seems not effected/crashing).I also posted a statement about such a kind of problem in
the admin section a while ago.
And that’s pretty easy 2 verify 4 everyone within a minute or 2.An other thing, which causes some lag imho
are big ‘system-wide’ encounter zones with
3 dozends of single encounters of different typs.
And i also suppose, there can be dozends of encounters
of NPCs fighting each other out of sight of everyone,
as soon as one player enters such a zone.
But a lot small zones cause more modding work than one big zone ……I also think i noticed a very short flickering
of yellow or red lag symbol,
the moment a player enters the server.I noticed NO performance difference
or lag / loss rising / reducing
by changing the performance settings in FL option
(on pretty old machines). -
Ok…After I remembered I am sure that at least NPCs exist out of the player field of view. And I can explain why I am in this opinion.
When I was at WTS-World, I shot at the wreck, I REALLY TOOK CARE that no NPC would be in my field of view, so I could check my new treasure. Then, BEAAÄMMM, NPCs lootet out of my field of view my lovely treasure!!
(Note: WTS World has better tractors, NPC had tractor beam ~5k~ and my scanner only allowed me to see them in 1.5k distance.)So I can’t say if they are shooting each other, but at least they exist and react. But I will use this as an argument and I belive that they may also kill each other.
-
-
Hmm… Do you know what is myphical Multimedia Timer in Windows? When i hosted CS server, i read one thing that Multimedia Player in Windows may activate Multimedia Timer and all will be ok.
May be problem in it? Or its Microsofts joke?P.S. I have 100Mbit connection with internet speed 1,4Mbyte In/Out (~11Mbit/s), P4 HT 3GHz 2Mb L2 Cache and density and max battlesize reduced in 2 times.
With 10 players server load not more 15 ms. When all 5 playerns in one system there is yellow lag on clients and cutted movements of players.P.P.S. Was trying to run flserver on linux with wine but still unlucky
-
One thing that I don’t see here related to lag is how many hops from the client computer to the Server. Also, communication problems that occur between the client and server (router tables updating, ISP problems, and aging communication tech such as old wiring or dysfunctional equipment). You see things from cable companies that say they have a fiber backbone, problem is if your wiring is over 10 - 15 yrs old your not going to get a good signal and may be prone to interference from outside forces.
-
Sorry, I have 100Mbit connection with internet speed 1,4 Mbytes In/Out (~11Mbit/s)
-
One of the major causes of lag on the discoverygc server is NPC related. Obviously this depends on your mod and how many NPCs it is designed to spawn. The discovery mod is not particularly NPC intensive but with players in many systems there are lots of NPCs.
We use the flhook NPC spawn thresholds to control NPC related load. These thresholds can be a little counter intuitive - if you have many players on the server and set a high spawn-off threshold, say 70ms, the server load will climb to meet this. We currently set both the spawn-off and spawn-on thresholds to about 40ms. In effect this sets the server load to 40ms - still a bit laggy but playable. The downside with this is that there are not many NPCs around when the player load climbs high.
For most other servers I’d suggest setting these parameters to lower numbers say 20 or 30ms.
Another major cause of apparent lag is people with bad wifi connections. These guys drop lots of packets over the wifi link and this shows up as lag to both the player and the other players around them. Not much can be down about this - although you can use the anti-cheat plugin and/or CheaterDeath to kick players with very bad connections.