diff --git a/analysis/PoR_Analysis.ipynb b/analysis/PoR_Analysis.ipynb index 204fcef..f797227 100644 --- a/analysis/PoR_Analysis.ipynb +++ b/analysis/PoR_Analysis.ipynb @@ -393,12 +393,12 @@ "TotalECBlocks = NumberOfFiles*(ECK+ECM)\n", "ECBlocksPerNode = TotalECBlocks/NetworkSize\n", "NbPoRinEC = ECblockSize/PoRblockSize\n", - "TotalUsedCapacity = int(NumberOfFiles*FileSize)/int(1024*1024*1024)\n", + "TotalUsedCapacityTB = int(NumberOfFiles*FileSize)/int(1024*1024*1024)\n", "TotalNetworkCapacity = NetworkSize*NodeCapacity/1024\n", "\n", "print(\"\\n *** Dataset and block structures *** \\n\")\n", "print(\"There are %d files of size %d KB (%2.1f MB)\" % (NumberOfFiles, FileSize, FileSize/1024))\n", - "print(\"The total storage used in the network is %2.1f TB and there is %2.1f TB of available storage for a total of %2.1f TB\" % (TotalUsedCapacity, TotalNetworkCapacity-TotalUsedCapacity, TotalNetworkCapacity))\n", + "print(\"The total storage used in the network is %2.1f TB and there is %2.1f TB of available storage for a total of %2.1f TB\" % (TotalUsedCapacityTB, TotalNetworkCapacity-TotalUsedCapacityTB, TotalNetworkCapacity))\n", "print(\"There will be %d EC blocks of size %2.1f MBs per file\" % (ECK+ECM, ECblockSize/1024))\n", "print(\"There is a total of %d EC blocks in the network\" % TotalECBlocks)\n", "print(\"There is an average of %2.1f EC blocks per node (assuming an homogeneous distribution)\" % ECBlocksPerNode)\n", @@ -454,19 +454,19 @@ "print(\"The PoR vertical verification factor is %2.1f%%\" % VerticalVerification)\n", "\n", "\n", - "TotalPoRStorage = NumberOfFiles*HorizontalVerification*PoRblockSize/1024\n", + "TotalPoRStorageMB = NumberOfFiles*HorizontalVerification*PoRblockSize/1024\n", "NodeAgregationTime = NbPoRinEC*VerticalVerification/100*ECBlocksPerNode*(HorizontalVerification/(ECK+ECM))*AgregationCost/(1000*60)\n", "PoRPerYear = 365*24/(ECL*MTBF)\n", "\n", "\n", "print(\"\\n *** PoR Storage and Time Requirements *** \\n\")\n", - "print(\"The total storage required for PoR proofs is %2.1f MB to check a total of %2.1fTB of data each round\" % (TotalPoRStorage, TotalUsedCapacity))\n", + "print(\"The total storage required for PoR proofs is %2.1f MB to check a total of %2.1fTB of data each round (%2.6f%%)\" % (TotalPoRStorageMB, TotalUsedCapacityTB, TotalPoRStorageMB/TotalUsedCapacityTB/1024/1024*100))\n", "print(\"To verify %d EC blocks and %2.1f%% PoR blocks per file in the system:\" % (HorizontalVerification, VerticalVerification))\n", "print(\"Each node will spend %2.1f minutes (%2.1f hours) agregating PoR proofs\" % (NodeAgregationTime, NodeAgregationTime/60))\n", "print(\"It will take the system %d hours (%2.1f days) to accidentally lose M nodes\" % (MTBF*ECM, MTBF*ECM/24))\n", "print(\"Lazy repair should be triggered after %d hours (%2.1f days)\" % (MTBF*ECL, MTBF*ECL/24))\n", "print(\"Assuming PoR verifications are done once per lazy repair round, PoR verification takes %2.1f%% of the time\" % ((NodeAgregationTime*100)/(MTBF*ECL*60)))\n", - "print(\"There are %2.1f PoR verification rounds in a year accumulating %2.1f GB of storage\" % (PoRPerYear, PoRPerYear*TotalPoRStorage/1024))\n", + "print(\"There are %2.1f PoR verification rounds in a year accumulating %2.1f GB of storage\" % (PoRPerYear, PoRPerYear*TotalPoRStorageMB/1024))\n", "\n", "color = [\"red\", \"orange\", \"green\", \"blue\"]\n", "storVector = []\n", @@ -480,10 +480,10 @@ " for PoRS in range(64,1024,4):\n", " PoRblockSize = 31*PoRS/1024\n", " NbPoRinEC = ECblockSize/PoRblockSize\n", - " TotalPoRStorage = NumberOfFiles*HorVer[i]*PoRblockSize/(1024*1024)\n", + " TotalPoRStorageMB = NumberOfFiles*HorVer[i]*PoRblockSize/(1024*1024)\n", " NodeAgregationTime = NbPoRinEC*VerVec[i]/100*ECBlocksPerNode*(HorizontalVerification/(ECK+ECM))*AgregationCost/(1000*60*60)\n", " PoRPerYear = 365*24/(ECL*MTBF)\n", - " storageVector.append(TotalPoRStorage)\n", + " storageVector.append(TotalPoRStorageMB)\n", " agregationVector.append(NodeAgregationTime)\n", " storVector.append(storageVector)\n", " aggVector.append(agregationVector)\n",