]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
provisioning: include the cost of replacing failed hard drives
authorBrian Warner <warner@allmydata.com>
Mon, 10 Sep 2007 22:46:45 +0000 (15:46 -0700)
committerBrian Warner <warner@allmydata.com>
Mon, 10 Sep 2007 22:46:45 +0000 (15:46 -0700)
src/allmydata/provisioning.py

index d0ae5d1f42bcb7a33e6927f52263b5bc7d01ff18..93164e876a60a663da84a74bf10192563a81579f 100644 (file)
@@ -604,16 +604,10 @@ class ProvisioningTool(rend.Page):
             server_bandwidth_mbps = mathutil.div_ceil(int(server_bandwidth*8),
                                                       int(1e6))
             server_monthly_cost = 70*server_bandwidth_mbps + 44
-            total_server_monthly_cost = float(num_servers * server_monthly_cost)
             add_output("Servers", T.div["Monthly cost per server: $",
                                         server_monthly_cost])
-            add_output("Grid", T.div["Monthly cost for all servers: $",
-                                     number(total_server_monthly_cost)])
             add_output("Users", T.div["Capital cost per user: $",
                                       number(total_server_cost / num_users)])
-            add_output("Users",
-                       T.div["Monthly cost per user: $",
-                             number(total_server_monthly_cost / num_users)])
 
             # reliability
             any_drive_failure_rate = total_drives * drive_failure_rate
@@ -622,6 +616,21 @@ class ProvisioningTool(rend.Page):
             add_output("Drives",
                        T.div["MTBF (any drive): ",
                              number(any_drive_MTBF_days), " days"])
+            drive_replacement_monthly_cost = (float(drive_cost)
+                                              * any_drive_failure_rate
+                                              *30*86400)
+            add_output("Grid",
+                       T.div["Monthly cost of replacing drives: $",
+                             number(drive_replacement_monthly_cost)])
+
+            total_server_monthly_cost = float(num_servers * server_monthly_cost
+                                              + drive_replacement_monthly_cost)
+
+            add_output("Grid", T.div["Monthly cost for all servers: $",
+                                     number(total_server_monthly_cost)])
+            add_output("Users",
+                       T.div["Monthly cost per user: $",
+                             number(total_server_monthly_cost / num_users)])
 
             # availability
             file_dBA = self.file_availability(k, n, server_dBA)