Created
September 10, 2013 10:53
-
-
Save pandemicsyn/6507797 to your computer and use it in GitHub Desktop.
@gholt's ring part power calculation script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import math | |
| min_drives = 10 | |
| max_drives = 60000 | |
| replicas = 3 | |
| part_power = math.ceil(math.log(math.ceil(max_drives * 100.0 / replicas), 2)) | |
| print "part_power: %d\npartition_count: %d\napproximate per drive with %d drives: %.02f\napproximate per drive with %d drives: %.02f" % (part_power, 2**part_power, min_drives, 2**part_power * replicas / min_drives, max_drives, 2**part_power * replicas / max_drives)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment