Re: large *.can files make things slow
By: MRO to Digital Man on Tue Jan 02 2024 07:37 am
Re: Re: Really struggling with windows install pls help :)
By: Digital Man to Matthew C E Bamber on Mon Jan 01 2024 03:48 pm
So I have an ip.can file that is about 1.3 gigs large, and when it gets this large there is a very long delay before a user can connect because I believe the bbs is working on parsing each line and seeing if the ip matches. I would assume I would have the same issue with host.can and other .can files.
I was wondering if there's anything I can do on my end to keep these large .can files and speed things up, or if synchronet needs some internal changes.
1.3 gigs is pretty massive. How'd that happen?
A couple of my servers were under SMTP botnet attack since early December (or earlier) and I started aggressively persistent filtering them (3 failed SMTP logins as a threshold, which is very low) - since then I have over 5000 IPs blocked in my ip.can file which is at the moment 730189 bytes in size - and that's with all the extra metadata (e.g. expiration date) that's now added with auto-filtered IP addresses. Anyway, you're saying that your ip.can file is over a thousand times larger. I wonder if you have a lot of duplicates or perhaps every IP of a subnet listed, when instead you could be using CIDR notation to make the file much smaller. Or just expiring/removing old entries would eliminate much of that file size. Making the expiration of old entries easier was one of my main motivations for the recent overhaul of how auto-added .can file entries are formatted.
All that said, the Synchronet servers *could* (they don't) cache the ip.can file contents in memory (making it much faster to search through) - but 1.3 gigs is a lot of RAM to dedicate to that purpose. And each server would have its own cache of the file contents, so you'd be using several gigabytes of memory for all of SBBS to have that massive ip.can file cached. It can be done and would likely have a significant performance improvement, but at the cost of a lot of memory used (in your case).
--
digital man (rob)
Rush quote #74:
A modern-day warrior mean, mean stride, today's Tom Sawyer, mean, mean pride Norco, CA WX: 56.2øF, 63.0% humidity, 0 mph E wind, 0.00 inches rain/24hrs
--- SBBSecho 3.20-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)