On Jan 28, 2016, at 1:14 PM, O'Connell, Ryan <ryan.oconnell@viasat.com> wrote:
Thanks Alan. I am using INNODB and default indexes (default schema from mods-config). I put 65k ip’s in the pool so that I could let the test run for a bit but that’s definitely contributing to the performance bottleneck. If I drop the number to 5k I can do a bit more (5/sec).
That's low. You know if you run the server in debug mode it becomes single threaded right?
As a next step, I added an index to include the pool_name but unfortunately the results are the same.
If you're not running in debug mode, it's probably roundtrip time, or I/O latency that's the cause of the poor performance. FreeRADIUS is largely synchronous, so latency between FR and the database really matters.
---- from “show create table radius.radippool” ---- radippool | CREATE TABLE `radippool` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `pool_name` varchar(30) NOT NULL, `framedipaddress` varchar(15) NOT NULL DEFAULT '', `nasipaddress` varchar(15) NOT NULL DEFAULT '', `calledstationid` varchar(30) NOT NULL, `callingstationid` varchar(30) NOT NULL, `expiry_time` datetime DEFAULT NULL, `username` varchar(64) NOT NULL DEFAULT '', `pool_key` varchar(30) NOT NULL, PRIMARY KEY (`id`), KEY `radippool_poolname_expire` (`pool_name`,`expiry_time`), KEY `framedipaddress` (`framedipaddress`), KEY `radippool_nasip_poolkey_ipaddress` (`nasipaddress`,`pool_key`,`framedipaddress`), KEY `radippool_nasip_poolkey_ipaddress_pool_name` (`nasipaddress`,`pool_key`,`framedipaddress`,`pool_name`) ) ENGINE=InnoDB AUTO_INCREMENT=152091 DEFAULT CHARSET=latin1 |
Even with some improvements to MySQL it sounds like Redis is a much better option so I’ll explore that instead. Thanks again for your feedback.
It'll scale to millions of lease allocations a second if you have enough Redis/FreeRADIUS servers and a front end load balancer :) -Arran