Skip to content

Instantly share code, notes, and snippets.

@pandemicsyn
Created September 10, 2013 10:53
Show Gist options
  • Select an option

  • Save pandemicsyn/6507797 to your computer and use it in GitHub Desktop.

Select an option

Save pandemicsyn/6507797 to your computer and use it in GitHub Desktop.
@gholt's ring part power calculation script
#!/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