formula for calculating the max number of disks on a loop without losing performance