Skip to content
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

Make the Eyetest threaded and make it a periodically check based on the Servers Performance #42

Closed
DJPlaya opened this issue May 2, 2020 · 0 comments
Assignees
Labels
improvement An improvement of existing Functions and Code

Comments

@DJPlaya
Copy link
Owner

DJPlaya commented May 2, 2020

Ref #41
First its needed to rewrite the Eyecheck so it checks each Client in a different Thread.
Secondly we need to extend the 'g_bShouldProcess' Array so we know which Clients are checkt right now, and which need to be, ordered with an Timestamp or something.
Then we need to mesure the commonly Performance drop made by a single Player Thread in TPS and do set it as default Value in 'kacr_eyes_performance_ratio'.
Now we can automatically adjust the Eyecheck Threads based on the Servers TPS.

Cvars:
'kacr_eyes_performance_enable' - 0 - Do only periodically check for Aimbots/Wallhacks if the Server is overloaded. Only useful for Servers above 20 Players
'kacr_eyes_performance_ratio' - #3# - The Ratio between Players getting Aimbot Checks and TPS. You should read the Wiki before changing this

Wiki:
|-How to adjust the Eyetests Performance
Since the Eyetests is by far the most Resource Intensive Part of KACR, it includes a Way to regulate its Performance. This is done by adjusting the Numbers of Players being reviewed at once.
If you do experience Lag caused by KACR, you should enable the the Performance Regulator.

First you should set 'kacr_eyes_performance_enable' to '1'.
Then you need to adjust 'kacr_eyes_performance_ratio', it is for the Ratio between Players getting Eyetest Checks and the TPS(Ticks Per Second) difference to the Servers Tickrate.
For an Example, an Value of 3 would mean, that every 3 TPS below the Servers Tickrate, one of the Players wont be checked. If we continue this Example, 60 TPS on an Server with an Tickrate of 66 and 20 Players, would result in 18 beeing checked at once.
Using the default Value of 'kacr_eyes_performance_ratio' is not recommended since the TPS drop varys depending on your Game, Gamemode, Hardware and general Settings and Plugins.

|-FAQ #change
Q: My Server does Lag, what can i do
A: The most Resource Intensive Part is the Aimbot/Wallhack Check, you can adjust its Performance, have a look at the 'How to adjust the Eyetests Performance' Wiki Page

@DJPlaya DJPlaya added the improvement An improvement of existing Functions and Code label May 2, 2020
@DJPlaya DJPlaya self-assigned this May 2, 2020
@DJPlaya DJPlaya closed this as completed Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement An improvement of existing Functions and Code
Projects
None yet
Development

No branches or pull requests

1 participant