• lag with 35+ players high pings
    33 replies, posted
When the lag issue does happen all players have high ping. Easily 250+. When there is no lag players ping are in normal range of 20 right up to 100ish. As soon as the lag happens the pings are high. I use net_graph 4 a lot to see if there is anything obvious. Rates: sv_minrate 500 sv_maxrate 30000 decalfrequency 10 sv_maxupdaterate 66 sv_minupdaterate 10 Dedicated Specs: 16GB Ram CPU E5-1620 0 @ 3.60GHz 500 Mbps connection Windows Server 2008 R2 SP1 Enterprise Edition below is a picture of my netgraph as the server hit the main crash. [url]http://i.imgur.com/cxnFFLW.jpg[/url] Not running anything major. We had cars and an ATM system but they were removed due to most players not using them. most entities are crated up to keep them to a minimum on the map as loose ones are removed at set intervals to avoid them spamming the server. Custom F4 and Tab menu inventory system Wire ULX - ULIB log system various other small things such as meth system, crating system and weed/drugs mod As I say entities ain't left sitting around.
Is this the only server running on the box?
Theres a few however none are exactly demanding. This is the only game server that does it. I use TCAdmin and can see that CPU usage and RAM are minimum never seen either hit 50% This DarkRP server got these strange lag spikes before we were using any other servers on the box
A lot of User messages are being sent. I reduced lag in another game-server which used a lot of user-messages ( different game-mode ) so it might be worth a shot... Take a look at this: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/networking/converting_umsg_to_net_messages.lua.html[/url] Follow the instructions at the bottom and most user-messages will be converted to net-messages ( the ones that won't be converted are things like SendLua, NWVars, etc... I'll be releasing something soon for those. Are you running M9K or FAS2 on this server? They have memory leak issues and there are other mods that have memory leaks too.
yea forgot to mention our weapons we are currently using FAS2 buddy Tanks for that info I'll take a good read at that tonight. You sir are a legend. EDIT: Added it to my main server after testing on test server. Will report back if it works or issues/bugs
It won't work for the memory leaks, only for converting some user messages to net messages. I may release something to fix their memory leaks at some point.
"Every little helps" - Tesco As above yea. Could I possibly add you on Steam for Chat at some point? Won't be a pest
Feel free.
Currently 40 players All the player pings again over 100 [url]http://i.imgur.com/JiJ5gzv.jpg[/url] Net_graph 4 [url]http://i.imgur.com/kKBPEAm.jpg[/url]
Well, your addons are not using usermessages properly. ( You can see extreme spikes in the dark yellow color. )
We don't use much other than weapons, drugs and 2 drug mods for making a bit more money. Rest of the things we use is custom F4 and tab menu and multiple building tools
Well something about your server makes it send a lot of data to the clients, increasing your upload speed usage, the more the server has to upload/send to the player and the less servers uploading speed is, the higher the ping will be. [editline]2nd January 2015[/editline] It can just be 1 addon that is crap, so having small amount of addons is not exactly a reason to say "it can't be addons".
What I meant was that we don't use anything that is super resource demanding. Other than the FAS weapons we use
Did you open each addon and examined how "resource demanding" it is? It could also be the gamemode btw.
Most likely is. I thought I put up top that it's DarkRP, obviously I did not. Anyone suggest the main things that needed changed/removed from darkrp to "optimise" it
If you used my networking conversion and usermessages are still being used, look for the following functions in the .gma files ( Lua is plain text ) without quotes; Also, I don't know the full list so I may be leaving some out: ":SendLua", ":NetworkVar", ":GetNW", ":SetNW", ":SetNetworked", ":GetNetworked" If I left some out please help me compile a full list so I can convert them to net-messages; also the NW variables will be converted with my networking addon so they'll only be updated when the values change instead of all the time as they currently are...
I know Rp printers use :SetNWString as do a few other mods we use to set data to players, are there wasy to convert them easily?
Depends what you mean by easily... The data needs to be networked so you'd need to write up something to handle networking or just create a new net.Receive for each one. Additionally you'd need to ensure that EVERYWHERE which uses the data is converted. Etc... With my method it'll redirect those functions through my net system. The good thing about that method is, is that it is a drag and drop replacement / fix and no code needs to be changed. Additionally, regardless of how many times Get or Set is called, if the data doesn't change then it isn't networked ( unless the data-type is a table; I still need to write a handler so that only the changed key/values are updated ) which means you run off cached data until the data changes. I need to do a bit of research before I convert them though. I need to see if all of the data points are broadcasted, or if they're private, etc... If they're all public then it'll be straight-forward. If they're not then I may need to setup a table to map the points out. I'll see about starting on that in a bit, currently getting rid of a lot of repetitive helper functions in my code with the new data BuildAccessors system..
I need to get them done asap, your script did help a hell of a lot though. Still get the ping issues when we get around 40 players, before it only happened at around 30 [editline]3rd January 2015[/editline] Half the issue is testing, as it only happens when there are many players it's hard to replicate in a dev enviroment
I'm the only one that sees normal lag with that player number on darkrp on a posible non-optimized map?
There are servers that use the exact same map with many more players. We ain't wanting to aim for 80 players all we would like is a smooth experience at around 30-50 players
An unoptimized map shouldn't have anything to do with ping unless it causes players' FPS to be so low that their ping goes up only due to the delay between frames. Durgz mod is nothing short of an awful addon if you want efficiency. I recoded it from scratch in a modular format so as to avoid every drug having Think and PostProcess hooks and 5 networked variables per player per drug. I haven't released it but I may post it here later if you can convince me.
If it's private it's private, it has no real RP use anyway and most players agree with that. Thankyou anyway. After a hard time of convincing and bribing players to play while I mess on with stuff I now have a test enviroment with around 30 players. After first joining after a restart to enable DbugR again I pulled up the following: URPC been the biggest at the time but has since dropped to sub 200 [url]http://i.imgur.com/aa4D75w.jpg[/url] Just shortly after taking this picture AWarn became the highest user. Anyone had bad experience with AWarn?
Change your tickrate to 33 and set the below: sv_minrate 33000 sv_maxrate 100000 sv_maxupdaterate 33 sv_minupdaterate 33 sv_maxcmdrate 32 sv_mincmdrate 32
Why would I increase the tickrate? More frames for the server to process is it not? Not questioning your knowledge I'd just like to learn why it should be done instead of just doing it. I did mess with rates but without restarting all the time it's hard to keep the players on that actually cause the lag issue.
[QUOTE=adamski0811;46848929]Why would I increase the tickrate? More frames for the server to process is it not? Not questioning your knowledge I'd just like to learn why it should be done instead of just doing it. I did mess with rates but without restarting all the time it's hard to keep the players on that actually cause the lag issue.[/QUOTE] Tickrate is default 66 so 33 is half
I was using 22 Tick
Have you tried running the server without ANY plugins, take a net_graph 4 reading. Then reintroducing each addon one by one whilst also taking net_graph 4 readings. Robot is 100% right. The input spikes are quite large. I would assume it would be a memory leak or a bad bit of scripting. If the resource is too large it will cause blackouts and crashes within the server. Have you also checked the server console for any errors? Also to test your server just use ulx bots. They should run around causing the server enough load to get a accurate answer during server down times.
I have a test server using the same dedicated machine I can test on. No I have not tried that due to it only happen at a certain player count. I have removed a lot of things before this thread such as the ATM system and vehicle.
[QUOTE=adamski0811;46849200]I was using 22 Tick[/QUOTE] Its best to use either 16,33,66 or 100 tickrate. You'll need to adjust the parameters I mentioned earlier for other numbers than 33.
Sorry, you need to Log In to post a reply to this thread.