New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lag on player join #59

Open
Waffleman123s opened this Issue Jun 29, 2016 · 168 comments

Comments

Projects
None yet
@Waffleman123s
Copy link

Waffleman123s commented Jun 29, 2016

I have installed the new version of ULX and ULIB and when ever a player joins the server spike lags for a few seconds and I need to know how to fix this asap!
I deleted all my addons and just left ULX and ULIB in and it still does it now when ever I delete ULX and ULIB the lag stops!!???

Please help me asap!

@sammyt291

This comment has been minimized.

Copy link

sammyt291 commented Jun 29, 2016

ULX / ULib version?
OS version?
Latest gmod version?
Errors in console?

And what have you already tried aside from removing other addons?
If nothing try deleting or temporarily renaming your ulx and ulib folders in /garrysmod/data.
Restart, and test with a fresh installation.

@Waffleman123s

This comment has been minimized.

Copy link
Author

Waffleman123s commented Jun 30, 2016

0 ERRORS in console! We had the latest version of ULX and ULib and we create a fresh darkrp gamemode installed ULX and ULib FRESH and still Lags when people Connect!!!! FML

@Nayruden Nayruden changed the title ULX and ULIB BUG Lag on player join Jul 2, 2016

@Nayruden Nayruden added the feedback label Jul 2, 2016

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Jul 2, 2016

What OS? Are you using the latest version of GMod?

@sammaxis

This comment has been minimized.

Copy link

sammaxis commented Jul 8, 2016

I believe I am experiencing the same issue as the OP.

It's a mild lag that only occurs on player join or leave. I have tried removing everything outside of ULX & ULIB as well as changing other settings.

Looking for some help.

@Mika32150

This comment has been minimized.

Copy link

Mika32150 commented Jul 9, 2016

Same problem here, please fix Ulib and ULX. Before we doesn't have this lag when someone join / disconnect.

@Mika32150

This comment has been minimized.

Copy link

Mika32150 commented Jul 9, 2016

For me i use Debian 8 with the last gmod update !

@davethestuff

This comment has been minimized.

Copy link

davethestuff commented Jul 9, 2016

Also experiencing this problem. Think it started since the latest gmod update.

@Mika32150

This comment has been minimized.

Copy link

Mika32150 commented Jul 14, 2016

Someone work on the problem ?

@FlashModz

This comment has been minimized.

Copy link

FlashModz commented Jul 15, 2016

i'm some problems.

#61

Debian 8

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Jul 16, 2016

I'm unable to duplicate this problem, but I've never tested on Debian before (I use Ubuntu). Will try installing Debian now.

@Nayruden Nayruden added investigation and removed feedback labels Jul 16, 2016

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Jul 16, 2016

I still can't replicate this issue, and I don't see what Garry would have changed recently that would have resulted in this for Debian users. However, I took a wild stab at what the issue may be, so please try using the following slightly modified ULX and ULib versions and report back --

http://ulyssesmod.net/test_ulib.zip
http://ulyssesmod.net/test_ulx.zip

Note: due to the changes in these, there may be some errors. I tried to clean up any obvious problems, but this should work for this experiment.

@Nayruden Nayruden added feedback and removed investigation labels Jul 16, 2016

@sammaxis

This comment has been minimized.

Copy link

sammaxis commented Jul 16, 2016

I'm not using Debian. We're hosted on NFO and I'm experiencing the same issue.

@uRandomAlex

This comment has been minimized.

Copy link

uRandomAlex commented Jul 16, 2016

@Nayruden You should create another GitHub branch and make changes there. I don't want to ruin all my ULib/ULX modifications to test this.

@uRandomAlex

This comment has been minimized.

Copy link

uRandomAlex commented Jul 17, 2016

@Nayruden Have you tried to play on a live server, 10+ players (not bots)? Problems starts there. Every new joined player, that's on "Sending client info" stage (PlayerAuthed/PlayerInitialSpawn hooks), freezes server for a second.

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Jul 17, 2016

I do not have the ability to test on such a server, @uRandomAlex.

@FlashModz

This comment has been minimized.

Copy link

FlashModz commented Jul 18, 2016

@Nayruden actualy in the test
Come my server :) - What your Steam ?

Live Test in Progress
RM-CommUnity

@PolSpock

This comment has been minimized.

Copy link

PolSpock commented Jul 19, 2016

@Nayruden same problem with test_ulx and test_ulib
(Linux debian)

@FlashModz

This comment has been minimized.

Copy link

FlashModz commented Jul 20, 2016

@Nayruden same problems on my Debian 8... with tes_ulx and ulib.

Solution ?

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Jul 21, 2016

I need someone to volunteer their server for experimentation; otherwise, I'm just making wild guesses. I'm unable to do anything for the next week or two, as I am moving my household across the country.

@sammaxis

This comment has been minimized.

Copy link

sammaxis commented Jul 21, 2016

I suppose I'd be able to do that.

http://steamcommunity.com/id/sam_maxis/

@Violat0r

This comment has been minimized.

Copy link

Violat0r commented Jul 25, 2016

I can confirm we have this issue on our servers also, mainly on DarkRP. We are running on a Windows box. No errors, latest gmod, lastest ulib/ulx. When I use an addon like FProfiler and what not, its always ulx/ulib spiking in cpu when someone joins the game.

@FlashModz

This comment has been minimized.

Copy link

FlashModz commented Aug 3, 2016

Solution ?

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Aug 3, 2016

@Violat0r

This comment has been minimized.

Copy link

Violat0r commented Aug 3, 2016

I can volunteer our server(s) that have the issue http://steamcommunity.com/id/violator555/

@mcNuggets1

This comment has been minimized.

Copy link

mcNuggets1 commented Apr 27, 2017

@Hazbelll

This comment has been minimized.

Copy link

Hazbelll commented Apr 27, 2017

@Nayruden

your reply once again seems to be all about you, not the community.

Earlier you claimed the "average user" was incapable of achieving something so simple as installing a SQL module, which feels like you're essentially saying the community is completely inept. I guess that's why you're interpreting what I say as "all about me"?

ULib does have many other projects utilizing it

Oh then by all means point me to them then as I'm actually genuinely interested. Yes, myself and everyone else I know that works or has worked with ULib hasn't encountered such projects.

I have been nothing but respectful towards you, and I am saddened to not have that returned.

Oh no, don't get me wrong. I have respect for you, but I do question the work ethics towards ULX sometimes and how people (not just myself) are addressed about some things.

That's your choice though, seems anyone else jumps on a bandwagon of either making other admin mods in spite of yours (Don't approve of that, but nor do I approve of the spite back. Two wrongs don't make a right), making another admin mod in its own right as an alternative or just making their own for their own specific needs.

@sammaxis

This comment has been minimized.

Copy link

sammaxis commented Apr 27, 2017

@Nayruden @Hazbelll I would agree with the statement that the average user wouldn't understand how to install SQL. That doesn't mean they couldn't learn and it certainly doesn't mean they are inept. However you two really are derailing the thread into your personal argument rather than this thread being used to actually address issues.

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Apr 27, 2017

@Mika32150

This comment has been minimized.

Copy link

Mika32150 commented Apr 27, 2017

So why i have user players in users.txt ?? http://prntscr.com/f1jir5

@sweepyoface

This comment has been minimized.

Copy link

sweepyoface commented Apr 27, 2017

Yeah, DB discussion aside, storing all users, bans, or whatever in a single file is completely unnecessary and it should be split up, kind of like how ItemStore does it.

@Radray

This comment has been minimized.

Copy link

Radray commented Apr 27, 2017

My server was using the latest ULX at the time (around September last year) and we had roughly 3200 bans (550kb or so filesize). Whenever we banned someone there would be roughly a half a second lagspike.

Our solution was to make our own system for managing bans, but I do want to mention that all the effort that has gone into ULX and ULib is very much appreciated as my server used it for well over two years.

If you are absolutely unable to reproduce the lagspikes people are reporting relating to bans, I could possibly check if I have a backup still of the ulib datafiles that were doing this.

Regarding SQL/sqlite, I have to agree that it isn't for the average user. I've appreciated ULX saving data in flatfiles where it is easy accessible, however in terms of performance, SQL is superior to flatfile storage.

I am not entirely sure why ULib uses banid and from what I remember depends on banned_user.cfg when the CheckPassword hook can be used to prevent banned users from joining. I don't know if this has a performance impact though (it does seem to exec the banned_user.cfg every time someone is banned)

As for saving to a large flatfile, one could limit this to only once at startup, where you could load up the flatfile as usual, apply changes that were written to a separate file from before the restart, make a new save of the flatfile with updated values and delete the contents of the separate file. The server would then have an empty file to append lines to for desired changes on the next restart.

@sweepyoface

This comment has been minimized.

Copy link

sweepyoface commented Apr 27, 2017

You don't have to reproduce the lag to understand why rewriting a huge file every time someone gets banned would be a problem.

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Apr 27, 2017

@sweepyoface

This comment has been minimized.

Copy link

sweepyoface commented Apr 27, 2017

It certainly does, even if you have hardware fast enough so that it's barely noticable, go ahead and look at the net graph when you ban someone with 3000 other bans on the server.

I've already stated that the way to fix it is to split them into their own seperate files, so you aren't writing 3MB of data for every ban. This is ridiculously simple.

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Apr 27, 2017

@Mika32150

This comment has been minimized.

Copy link

Mika32150 commented Apr 27, 2017

And for users in users.txt do you have an idea @Nayruden

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Apr 27, 2017

@Mika32150

This comment has been minimized.

Copy link

Mika32150 commented Apr 27, 2017

Yes i've 3 darkrp servers ! I think user are here because i use : https://www.gmodstore.com/scripts/view/565/prometheus-a-gmod-donation-system

When someone stop to buy vip prometheus make him user and keep him in user.txt!
What do you think ?

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented May 1, 2017

@mcNuggets1, can you re-send me your files, please? I wasn't able to download them before.

@Mika32150

This comment has been minimized.

Copy link

Mika32150 commented May 1, 2017

@Mika32150

This comment has been minimized.

Copy link

Mika32150 commented May 8, 2017

@Nayruden : i've found a possible fix for that issue.

Lot of server owner have the Prometheus addon, it's a donation system for give rank, money etc..
Link : https://www.gmodstore.com/scripts/view/565/prometheus-a-gmod-donation-system

I've check my user.txt and i've over 8000 lines into. The problem is, my user.txt keep player with "user" group, it doesn't erase it.

I think if the user.txt has too many entries, it make server lag when someone join because he need to check if player has a group in these list.

I've contacted the creator of Prometheus and he reply that :

"Well that isn't a problem with prometheus though, it uses built-in functions from ULib to add/remove ranks, so if it doesn't remove the user from there, it isn't Prometheus fault, itš not like it adds/removes them from the file manually. Looking at their code, I can see it's because ULX/ULib doesn't check if the "addUser" function that is used to set ranks is trying to set it to default rank, it just sets it and doesn't care to what. The same "issue" would happen if you used the "addUser" thing in the ULX menu, it would also leave it in the file. They need ot implement a check in the "addUser" function that checks if the group they are being set to is default, remove the user fro mthe file then, instead of just changing the rank to user."

Can you fix this problem ?

@TeamUlysses TeamUlysses deleted a comment from Heyter Aug 27, 2017

@TeamUlysses TeamUlysses deleted a comment from Mika32150 Aug 27, 2017

@sweepyoface

This comment has been minimized.

Copy link

sweepyoface commented Aug 29, 2017

The fact that the issue of storing everything in one file hasn't yet been addressed is really concerning. Common technical knowledge is being dismissed in favor of this issue being 'not reproducible'.

It's unfortunate that a lot of people including myself are forced move off of ULX because of such a large but simple problem. You have a responsibility to this project, and behaving this way this says a lot.

@Hazbelll

This comment has been minimized.

Copy link

Hazbelll commented Aug 29, 2017

They can't be bothered, it's as simple as that.

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Aug 30, 2017

@sweepyoface there's no need to over-optimize when the current solution does not create any problems. We've been around and around on this, please review the discussion.

@Hazbelll yes, our constant updates to a long-term project (over ten years of history and support) clearly demonstrates our lack of concern.

We still have yet to see lag on player join in the wild... if you have a server you believe is affected, please come forward.

@sweepyoface

This comment has been minimized.

Copy link

sweepyoface commented Aug 30, 2017

I have never seen someone exercise such an absence of intellectual clarity. As I mentioned before, you don't need to reproduce the lag to understand why you shouldn't be rewriting a 3MB+ file constantly.

How is this over optimizing when many people have complained about lag due to this specific issue, how the hell can you say this doesn't create problems?!

@Codingale

This comment has been minimized.

Copy link

Codingale commented Sep 4, 2017

Personally we don't have lag on join (least from ULX, our issue is GCompute) but we do however have issues with banning and adding people to ranks with a lot of bans. We used to have 5000~ and the server would freeze for 5 seconds.

Removing all bans solved this I assume it's because of the function that sanitizes it as a strange table. We have a bans.txt but not the originalbannedusers.cfg if you need.

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Sep 4, 2017

@Codingale please send it my way -- megiddo@ulyssesmod.net. Thanks!

@Codingale

This comment has been minimized.

Copy link

Codingale commented Sep 4, 2017

@Nayruden

This comment has been minimized.

Copy link
Member

Nayruden commented Sep 5, 2017

Thanks, @Codingale. I've created an issue for it: TeamUlysses/ulib#37

@Hazbelll

This comment has been minimized.

Copy link

Hazbelll commented Sep 7, 2017

Hypocrisy 1

Hypocrisy 2

Step in the right direction regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment