How does freeradius calculate the number of required threads?