TeamUlysses / ulib

ULib: A Lua library for more rapid development on Garry's Mod servers
http://ulyssesmod.net
Other
105 stars 55 forks source link

Performance problems caused by file IO #38

Closed BlackCetha closed 2 years ago

BlackCetha commented 7 years ago

I've had performance problems on my server for a longer period of time. My server hung for around 3 seconds when a player joined. I tracked this down to ULib and its file IO.

The user file on my server had accumulated to .5MB and after deleting it, the problems disappeared. My current workaround is to delete it once in a while, but there must be an actual solution.

I suppose there are better ways to store and sync data than reading and overwriting the storage files completely. First thing that comes to mind is the SQLite DB.

Nayruden commented 7 years ago

This is related to TeamUlysses/ulx/issues/59, but this is the correct repository for the issue so I'll leave this one open. We've never been able to replicate this issue or see it occur in the wild. Can you please send us your users.txt and groups.txt? Would you be willing to let us see the issue on your server? If the problem is coming from these files, I'd also recommend disabling autopromote, which adds every user who joins.

BlackCetha commented 7 years ago

I can send you the backup of the files, but I won't make them public. Please add me on steam for that.

I have never used autopromote. However, we currently have 800+ people with ranks on the server which are saved in a database, so the list does get quite lengthy. I'm not sure if I can reproduce the issue if I just add back the files, but I'll try.

My steam profile is at http://steamcommunity.com/id/blackcetha

Codingale commented 7 years ago

Sent it to him @BlackCetha at megiddo@ulyssesmod.net It's what I did in https://github.com/TeamUlysses/ulx/issues/59#issuecomment-326935507

zpetty33 commented 2 years ago

https://github.com/TeamUlysses/ulib/pull/74 has been merged in the experimental branch. This will fix IO issues caused by massive users.txt files.