Thread: amxbans 4.0
View Single Post
ymboc
New Member
Join Date: Mar 2004
Old 04-19-2004 , 13:33  
#19

Quote:
Originally Posted by GIR
I'm sorry to say so but those are my findings. the only time my server lags is when I spam it with amx_find queries, the same thing would happen when somebody spams it with say events. The key being here, don't spam your server.
No the same thing doesnt happen when myself or a user spams with say messages -- My ping doesnt budge at all. Clearly you havent tested.

Quote:
The admin query is only executed when the plugin is loaded and the ban query is only executed when somebody connects.
Yes, as I have already stated, but thanks for the update.

Quote:
Both YoMama and me run very active servers, whe get a lot of connect request even when the server is full. Our servers get hammered alot but we do not seem to have this problem.
Yes, I run a fairly popular server myself with several stubborn users who insist on hammering the server until they get in. No, the effect of this introduced lag isnt huge, but it is still there. It is certainly not big enough for me to stop using this lovely time-saving plugin. However, the constant denials and jabs that I must be an 'idiot' for even testing if this plugin introduces lag is *really getting old*.

Quote:
Originally Posted by GIR
Both the admin query and the connect query are relatively simple queries which any SQL server shouldn't have a problem executing. The amx_find query however is complex because it uses the FIND statement.
Clearly you weren't paying attention when you looked at the code... You did look at the code first didnt you? I shudder to think if you just spewed info without looking for facts to back them up. The sql query executed on connect is actually more complex.

Query used in amx_find:
Code:
format(query,1024,"SELECT bid,ban_created,ban_length,ban_reason,admin_nick,admin_id,player_nick FROM amx_bans WHERE player_id='%s' order by ban_created desc", player_steamid)
Query used on client_authorized:
Code:
format(query,bufgrootte,"SELECT bid,ban_created,ban_length,ban_reason,admin_nick,admin_id,player_nick,server_name,server_ip,ban_type FROM amx_bans WHERE ((player_id='%s') and ((ban_type='S') or (ban_type='P'))) or ((player_ip='%s') and ((ban_type='I') or (ban_type='P'))) %s %s",authid,plip,servers_allowed,servers_denied)
Quote:
The only time my server started to lags is when I connected it to my MySQL server here at home and then spammed it with find queries.
Good for you! As I've already stated how much lag you see (if any at all) is proportional to the length taken to complete the query. In fact, it should be roughly equal to the sum of the network latency between the sql server and game server plus the length of time required to complete the query. The effect on my server is about a 10-30ms blib when someone connects - hard to notice indeed.

Quote:
Placing stuff in threads isn't feasebile at all. If you have a suggestion on howto do it then be my guest but it won't help along a single bit. If you spam your server then it's going to lag.
I love how you decide for everyone else what is feasible or not. That just rocks! In addition, I don't believe anyone specifically asking you to do this - it was just put out there.

I do have a couple ideas on how to do the thread business -- 'simply' start a new thread from within client_authorized(id) that performs the query and handles its outcome. However as previously mentioned, mthread is reportedly not working with amxmodx (I haven't confirmed this myself yet). Furthermore, as mentioned I do not have the time at the moment to test my ideas -- if I did I would have already put the modification out there .

Now, I dont know about you but this spat (between you and I) and the constant denials + jabs are getting old... maybe we should put it to rest and leave it as is.
__________________
Operator cs.whatthef*ck.ca
ymboc is offline