weeztor / darkrp

Automatically exported from code.google.com/p/darkrp
0 stars 1 forks source link

Massive lag with 35+ clients. #412

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Alrighty well I have tried everything trying to fix the issue from changing 
tick-rates, rates etc. This seems to be the only gamemode having the problem on 
my box at the moment, I'm running quality hardware so that can't be an issue.

Intel Xeon X3440 2.53GHz w/HT (8 CPUs)
4GB DDR3 ECC RAM
250GB SATA Hard Drive
1Gbps Port

So really it comes down to the script, is there any chance you could go through 
the game-mode and whatnot and optimize a few things and see if this helps the 
issue at hand.

Thanks.

Original issue reported on code.google.com by c_u_late...@hotmail.com on 18 Aug 2010 at 7:10

GoogleCodeExporter commented 9 years ago
._.

Original comment by fpeijnen...@gmail.com on 18 Aug 2010 at 9:25

GoogleCodeExporter commented 9 years ago
<3

Original comment by c_u_late...@hotmail.com on 18 Aug 2010 at 11:46

GoogleCodeExporter commented 9 years ago
I upgraded to 32 slots a few days ago, it was laggy as fuck when we got near 
full, I googled it a bit and found this:

sv_minrate 22000
sv_maxrate 22000

in server.cfg
I did that and the lag seems to have gone away completely.
Sorry if that's what you meant by trying 'everything'.

Original comment by ch...@watersideway.plus.com on 18 Aug 2010 at 12:32

GoogleCodeExporter commented 9 years ago
Already tried that and about 500 other combination's of different rates. As I 
said, this is the only gamemode on my box I'm having such major lag with after 
35+ players.

Original comment by c_u_late...@hotmail.com on 18 Aug 2010 at 12:34

GoogleCodeExporter commented 9 years ago
I can think of a way of removing loads of console commands, if that would help.

At the moment it generates a console command for the max of every entity.
That's a different console command for every entity.
Why not just do rp_max <entity> <number>
That way you only have the 1 command, rp_max, and the entity is an argument for 
it.

Original comment by ch...@watersideway.plus.com on 18 Aug 2010 at 6:11

GoogleCodeExporter commented 9 years ago
You could do the same with maxjobs and with rp_enablejob (rp_enablegundealers) 
etc.

Original comment by ch...@watersideway.plus.com on 18 Aug 2010 at 6:47

GoogleCodeExporter commented 9 years ago
How would console commands lag a server?

Original comment by fpeijnen...@gmail.com on 19 Aug 2010 at 9:04

GoogleCodeExporter commented 9 years ago
I don't know, I'm merely suggesting ways that DarkRP could seem cleaner :P
"I can think of a way of removing loads of console commands, [b]if that would 
help.[/b]"

Original comment by ch...@watersideway.plus.com on 19 Aug 2010 at 10:31

GoogleCodeExporter commented 9 years ago
Oo, I know one thing that lags, spawning a cheque or money, there's like a 2 
second lagspike before it spawns.

Original comment by ch...@watersideway.plus.com on 19 Aug 2010 at 10:43

GoogleCodeExporter commented 9 years ago
I'm not talking about little commands here, I'm talking about the script in 
general. One little command would make no difference. Please keep things 
on-topic.

Original comment by c_u_late...@hotmail.com on 19 Aug 2010 at 10:45

GoogleCodeExporter commented 9 years ago
Ah, but with 40 players how often do you think /dropmoney is gonna be used? >.>

Original comment by ch...@watersideway.plus.com on 19 Aug 2010 at 5:39

GoogleCodeExporter commented 9 years ago
The two seconds isn't a lagspike, it's a delay put there in purpose for the 
animation to finish.

Original comment by fpeijnen...@gmail.com on 20 Aug 2010 at 6:54

GoogleCodeExporter commented 9 years ago
ON purpose*

Original comment by fpeijnen...@gmail.com on 20 Aug 2010 at 6:55

GoogleCodeExporter commented 9 years ago
I know there's a delay, but it does lag too, you know the noise the button 
plays? That sort of stutters and repeats itself, as it does during a lag spike.
This has been mentioned before, if I remember correctly it was something to do 
with the usermessages being sent containing the information to display on the 
money prop/

Original comment by ch...@watersideway.plus.com on 20 Aug 2010 at 1:12

GoogleCodeExporter commented 9 years ago
Here's a screenshot of net_graph 4 with 32 clients.

http://img163.imageshack.us/img163/27/57168335.png

Original comment by c_u_late...@hotmail.com on 21 Aug 2010 at 10:05

GoogleCodeExporter commented 9 years ago
Any updates. Also confirmed with darksoul, sadistic and others that the script 
is causing this.

Original comment by c_u_late...@hotmail.com on 24 Aug 2010 at 10:53

GoogleCodeExporter commented 9 years ago
net_showmsg 1

Looks like your sending about 14 usermessages per tick, 10 look like gmod 
usermessages, 4 look useful.

Original comment by c_u_late...@hotmail.com on 28 Aug 2010 at 8:39

GoogleCodeExporter commented 9 years ago
Also this may be of some use, that's if you actually look into it.

http://img707.imageshack.us/img707/4889/netgraphd.png

12:38:04 CPU      In        Out      Uptime  Users  FPS    Players
         110.23 98165.73 252447.94    1027     3   10.00      40

Original comment by c_u_late...@hotmail.com on 28 Aug 2010 at 9:05

GoogleCodeExporter commented 9 years ago
Someone try to confirm it's MySQL.

temporarily switch to SQLite and see if it still lags.

Original comment by fpeijnen...@gmail.com on 28 Aug 2010 at 11:59

GoogleCodeExporter commented 9 years ago
I use SQLite.

Original comment by c_u_late...@hotmail.com on 28 Aug 2010 at 12:01

GoogleCodeExporter commented 9 years ago
I really need to know what causes this. I can't just "look" at it.

Original comment by fpeijnen...@gmail.com on 30 Aug 2010 at 5:09

GoogleCodeExporter commented 9 years ago
If you would like I could give you access to my server during peek so you can 
tinker with it.

Add me on steam, "pledging"

Original comment by c_u_late...@hotmail.com on 30 Aug 2010 at 10:21

GoogleCodeExporter commented 9 years ago
The problem could very well be firespread, the idiot who coded it, first uses 
ents.FindInSphere (a very resource eating function) BEFORE checking whether to 
burn anything at all. I'm fixing that now, check if it's fixed after the this 
update please.

I think this was the problem.

Original comment by fpeijnen...@gmail.com on 1 Sep 2010 at 3:23

GoogleCodeExporter commented 9 years ago
We can only hope. Also that's why I try to avoid ents.Find*/Nwbools/Think 
through out my code. I will get back to you in about 12 hours and show some 
results.

Original comment by c_u_late...@hotmail.com on 2 Sep 2010 at 7:59

GoogleCodeExporter commented 9 years ago
Well, It seems your fix had some affect, but not the kind we are looking for. 
Here's a net graph with 33 players.

http://img295.imageshack.us/img295/6295/68709954.png

Could there be something else silly in the code?

Original comment by c_u_late...@hotmail.com on 4 Sep 2010 at 12:31

GoogleCodeExporter commented 9 years ago
I'm beginning to think you've got people in your server making bases of 
unfrozen and welded props.

Original comment by fpeijnen...@gmail.com on 4 Sep 2010 at 7:06

GoogleCodeExporter commented 9 years ago
Tomorrow I will remove all props with 35+ people and then show you the lag is 
still apparent.

Original comment by c_u_late...@hotmail.com on 4 Sep 2010 at 8:43

GoogleCodeExporter commented 9 years ago
this tomorrow you're talking about is three days ago.

Original comment by fpeijnen...@gmail.com on 8 Sep 2010 at 8:50

GoogleCodeExporter commented 9 years ago
Sorry, been working crazy hours and have been missing peak time, I'll try get 
you results tomorrow.

Original comment by c_u_late...@hotmail.com on 8 Sep 2010 at 12:19

GoogleCodeExporter commented 9 years ago
Just clean up everything and the lag still occurred, obviously there is 
something else causing the problem.

Original comment by c_u_late...@hotmail.com on 13 Sep 2010 at 9:57

GoogleCodeExporter commented 9 years ago
Check with revision 721

Original comment by fpeijnen...@gmail.com on 15 Sep 2010 at 6:31

GoogleCodeExporter commented 9 years ago
Still a problem, but I don't see what could be causing it. The only think 
function left is;

function GM:Think()
if LetterAlpha > -1 and LocalPlayer():GetPos():Distance(LetterPos) > 100 then 
LetterAlpha = -1 end
end

And nwbools/ent.find* have been removed/optimized. I am clueless.

Original comment by c_u_late...@hotmail.com on 17 Sep 2010 at 12:06

GoogleCodeExporter commented 9 years ago
Just relooking at the code now, I see loads of ents.find* (around 30) that I 
overlooked last time, possibly something there could be causing the issue.

Original comment by c_u_late...@hotmail.com on 17 Sep 2010 at 12:28

GoogleCodeExporter commented 9 years ago
the GM:Think() is clientside, and you said the lag was serverside.

Original comment by fpeijnen...@gmail.com on 17 Sep 2010 at 11:13

GoogleCodeExporter commented 9 years ago
the only real ents.* functions are at player spawn and disconnect.
that can not be causing your lag. In order for ents.* functions to really lag a 
server up, it needs to be run every frame.

Original comment by fpeijnen...@gmail.com on 17 Sep 2010 at 11:19

GoogleCodeExporter commented 9 years ago
Sorry, wasn't thinking there for a second, in a bit of a rush on my way to 
work. The lag is defiantly server side. I have cut some features out of the 
script like earthquakes/zombies/letters and some other functions I do not use, 
hopefully I will find some improvements.

Original comment by c_u_late...@hotmail.com on 17 Sep 2010 at 11:20

GoogleCodeExporter commented 9 years ago
Once again, only had a quick look and did a N++ search. There is obviously 
something in there causing the problem. Because what else could it be?

Original comment by c_u_late...@hotmail.com on 17 Sep 2010 at 11:26

GoogleCodeExporter commented 9 years ago
An addon that only runs on DarkRP?

Original comment by fpeijnen...@gmail.com on 17 Sep 2010 at 1:58

GoogleCodeExporter commented 9 years ago
I don't use any besides Drugs. Other ideas?

Original comment by c_u_late...@hotmail.com on 17 Sep 2010 at 2:36

GoogleCodeExporter commented 9 years ago
no

Original comment by bloodyc...@googlemail.com on 18 Sep 2010 at 9:24

GoogleCodeExporter commented 9 years ago
I've updated FPP some more. I can't do any more.

Original comment by fpeijnen...@gmail.com on 22 Sep 2010 at 2:56

GoogleCodeExporter commented 9 years ago

Original comment by fpeijnen...@gmail.com on 22 Sep 2010 at 2:57

GoogleCodeExporter commented 9 years ago
I'll try it out and report back to you tomorrow. Do you have a steam I can 
contact you on, may be easier to find the source of the problem while we are 
both online and the server is peeking rather then try to contact via googlecode.

Original comment by c_u_late...@hotmail.com on 22 Sep 2010 at 3:02

GoogleCodeExporter commented 9 years ago
Well I forgot to get back to you again. I really don't know what in the code 
could be causing this, its more then likely something silly but I cant seem to 
find it. I have cut huge chunks out of the GM to try find the problem with no 
luck.

I am a bit worried you are not a little more concerned about the issue though, 
you are the main developer on the most popular gamemode in garrysmod history, 
but you don't seem to be concerned about the major flaw that exists when 
players are online.

Original comment by c_u_late...@hotmail.com on 2 Oct 2010 at 9:49

GoogleCodeExporter commented 9 years ago
That might be because you don't give me specific information. Rather than "it 
lags when there are many players" I know nothing. I can't just guess what the 
issue is, I've been guessing the cause of this for ages and I've done dozens of 
things to fix it. Yet you say it has no effect.

Original comment by fpeijnen...@gmail.com on 2 Oct 2010 at 2:05

GoogleCodeExporter commented 9 years ago
Did i not offer you access to my server and the chance to add me on steam?

Original comment by c_u_late...@hotmail.com on 2 Oct 2010 at 2:07

GoogleCodeExporter commented 9 years ago
Send me a link to your steam profile through e-mail, we'll discuss.

Original comment by fpeijnen...@gmail.com on 2 Oct 2010 at 4:41

GoogleCodeExporter commented 9 years ago
the e-mail is fpeijnenburg@gmail.com

Original comment by fpeijnen...@gmail.com on 2 Oct 2010 at 4:42

GoogleCodeExporter commented 9 years ago
Feel free to add me at any time as I can see you have been online since I sent 
the email.

Original comment by c_u_late...@hotmail.com on 3 Oct 2010 at 8:58

GoogleCodeExporter commented 9 years ago
3 Days, not a single reply to my email or an add. I see you deeply care about 
the issue.

Original comment by c_u_late...@hotmail.com on 5 Oct 2010 at 9:21