From: Lionel B. <lio...@bo...> - 2009-08-18 06:51:29
|
Michal Ludvig a écrit, le 08/18/2009 06:48 AM : > Michal Ludvig wrote: > > >> Eventually we could rework the whole cleaning process. Instead of doing >> (potentially massive) cleanups in fixed time periods there could be a >> minor cleanup on every, say, 1000th call. No need to count the calls, >> simple 'if(int(rand(1000))==0) { .. cleanup .. }' should be sufficient. >> > > Actually... attached is a patch that implements it. I'm running it with > cleanup_chance=10 (ie 1:10 chance to perform cleanup) on one of my > light-loaded servers and it seems to do the job. So far I've seen 13 > cleanups in 150 greylist checks which is quite on track. > > > BTW How about dropping the async cleanup path completely? In fact it would be the less troublesome way to do it : async cleaning would prevent any blocking in SQLgrey. Obviously it would only work with InnoDB, PostgreSQL or other DB with concurrent writes support. It might be time to test this codepath again if there's really a problem with cleanups. It should work in theory but I'm not sure where the bug is (might be in DBI or DBD drivers)... Lionel |