Raised This Month: $32 Target: $400
 8% 

Metamod Query Cache


Post New Thread Reply   
 
Thread Tools Display Modes
energie4cute
Member
Join Date: Sep 2009
Location: Home
Old 06-30-2014 , 09:55   Re: Metamod Query Cache
Reply With Quote #41

I've rewrote the extension ( cleaned up the code mostly ). The main thing I added was a RequestMap.
Now each time a A2S_INFO request is received, the IP it's added into a map. If the client sends more than qc_maxrequests per second he no longer receives the A2S_INFO responses in that second ( can be changed to a more severe behaviour if needed ). This could be done even better by peaking at the data just to check the IP and save some time that is used while the buffer is moved, but I have yet to search for some more info about the Valve networking code ( noob here ).

The only builds I made were CSGO,CSS,L4D,L4D2,TF2,SDK2013.

If anyone wants to build it : link

CVars :
- qc_time - A2S_INFO requests timeout in seconds.
- qc_maxrequests - Maximum ammount of A2S_INFO requests per second. ( RequestMap must be enabled for this to work )
- qc_requestmap_enabled - Enable/disable the RequestMap. Will rehook recvfrom ( I wanted to keep it optimized and this is better than checking if the RequestMap is enabled each time recvfrom is called )

Commands :
- qc_requestmap - Prints the RequestMap.
- qc_requestmap_clear - Clears the RequestMap. ( auto @ plugin_un/load / map_load )

How to install :
Quote:
Let's say you want to install it on a Linux CSS Server :
You copy qcache_mm.vdf into addons/metamod
You copy linux/qcache_mm.css/qcache_mm.so into addons/

Same rules apply to other servers.
Edit : Reuploaded new version. Should load now on Linux
Edit2 : Uploaded version 1.0.0.1. ( Added qc_requestmap_enabled and remade qc_requestmap a bit, now it shows the traffic done : total requests in that second and the total overlimits for all-time ). Also did some tests and it seemed pretty ok for low amounts of traffic ( 30 A2S_INFO requests per second ).
Edit3 : Recompiled.
Edit4 : Added SDK2013 version.
Attached Files
File Type: zip qcache_mm.zip (2.68 MB, 2099 views)

Last edited by energie4cute; 07-07-2014 at 11:03.
energie4cute is offline
Sarona
AlliedModders Donor
Join Date: Jul 2012
Old 06-30-2014 , 16:47   Re: Metamod Query Cache
Reply With Quote #42

Quote:
Originally Posted by energie4cute View Post
I've rewrote the extension ( cleaned up the code mostly ). The main thing I added was a RequestMap.
Now each time a A2S_INFO request is received, the IP it's added into a map. If the client sends more than qc_maxrequests per second he no longer receives the A2S_INFO responses in that second ( can be changed to a more severe behaviour if needed ). This could be done even better by peaking at the data just to check the IP and save some time that is used while the buffer is moved, but I have yet to search for some more info about the Valve networking code ( noob here ). I haven't tested the RequestMap since I didn't have enough time to write a tool.

The only builds I made were CSGO,CSS,L4D,L4D2,TF2. I tested only L4D2-Win, so please report any problems.

CVars :
- qc_time - A2S_INFO requests timeout in seconds.
- qc_maxrequests - Maximum ammount of A2S_INFO requests per second.

Commands :
- qc_requestmap - Prints the RequestMap.
- qc_requestmap_clear - Clears the RequestMap. ( auto @ plugin_unload / map_load )

Don't Work on CSS, server crash on extension load (Linux servers).
Sarona is offline
energie4cute
Member
Join Date: Sep 2009
Location: Home
Old 07-01-2014 , 18:57   Re: Metamod Query Cache
Reply With Quote #43

Post #41 updated. Linux builds should be fine now.
energie4cute is offline
Sarona
AlliedModders Donor
Join Date: Jul 2012
Old 07-02-2014 , 13:08   Re: Metamod Query Cache
Reply With Quote #44

Quote:
Originally Posted by energie4cute View Post
Post #41 updated. Linux builds should be fine now.

uhhh, how to install? the directories and files are different than previous versions.

Last edited by Sarona; 07-02-2014 at 13:09.
Sarona is offline
energie4cute
Member
Join Date: Sep 2009
Location: Home
Old 07-02-2014 , 21:01   Re: Metamod Query Cache
Reply With Quote #45

Let's say you want to install it on a Linux CSS Server :
You copy qcache_mm.vdf into addons/metamod
You copy linux/qcache_mm.css/qcache_mm.so into addons/

Same rules apply to other servers.

Also uploaded version 1.0.0.1 into the earlier post.
energie4cute is offline
Falu
Junior Member
Join Date: Jul 2014
Old 07-04-2014 , 06:01   Re: Metamod Query Cache
Reply With Quote #46

Quote:
] rcon meta load addons/qcache_mm
Failed to load plugin addons/qcache_mm (/home/servers/s11724/data/css/cstrike/addons/qcache_mm.so: undefined symbol: _Z6ConMsgPKcz).
How can I fix it?
I used the latest version of metamod (Metamod:Source version 1.10.1).

Greetz,
Falu
Falu is offline
energie4cute
Member
Join Date: Sep 2009
Location: Home
Old 07-04-2014 , 18:49   Re: Metamod Query Cache
Reply With Quote #47

Will recheck the builds tomorrow.

Edit : Recompiled. Try again. Please post the output after you load it.

Last edited by energie4cute; 07-05-2014 at 09:04.
energie4cute is offline
Sarona
AlliedModders Donor
Join Date: Jul 2012
Old 07-05-2014 , 17:51   Re: Metamod Query Cache
Reply With Quote #48

Quote:
Originally Posted by energie4cute View Post
Will recheck the builds tomorrow.

Edit : Recompiled. Try again. Please post the output after you load it.
Works good! . You can tell me that parameters are adequate to establish the following cvars??:

qc_time
qc_maxrequests

Thanks in advance.

Last edited by Sarona; 07-06-2014 at 04:50.
Sarona is offline
energie4cute
Member
Join Date: Sep 2009
Location: Home
Old 07-06-2014 , 08:54   Re: Metamod Query Cache
Reply With Quote #49

The default value for qc_time is 5, which means the cached A2S_INFO response is refreshed every 5 seconds ( it's not refreshed until a request comes,but that's not a problem ). It should be fine like that. qc_maxrequests it's the amount of A2S_INFO requests an IP can do in 1 second, and the default value is 3, which again should be fine.
energie4cute is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 07-06-2014 , 11:25   Re: Metamod Query Cache
Reply With Quote #50

have no idea how to compile, will just wait for sdk2013 version.

Last edited by Leonardo; 07-06-2014 at 11:25.
Leonardo is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode