gcpdiag/runbook/gce/vm_performance.py [864:937]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              self.actual_usage_comparision(
                  vm, disktype,
                  min(data[6], data[7]) * disk_io_util_threshold * 1000 * 1000,
                  'max_write_bytes_count')

            elif disktype == 'pd-standard' and int(
                total_disk_size[disktype]) < 100:
              # upto first 100GB, pd-standard disks have fixed IO limits
              op.info((
                  '\n\tIOPS and Throughput limits available for VM DiskType - {},'
                  '\n\tTotal DiskSize: {}:'
                  '\n\n\t Read-IOPS Count: {},'
                  '\n\t Read-Throughput: {} MB/s,'
                  '\n\t Write-IOPS Count: {},'
                  '\n\t Write-Throughput: {} MB/s\n').format(
                      disktype, int(total_disk_size[disktype]), 75, 12, 150,
                      12))

              self.actual_usage_comparision(vm, disktype,
                                            75 * disk_io_util_threshold,
                                            'max_read_ops_count')
              self.actual_usage_comparision(
                  vm, disktype, 12 * disk_io_util_threshold * 1000 * 1000,
                  'max_read_bytes_count')
              self.actual_usage_comparision(vm, disktype,
                                            150 * disk_io_util_threshold,
                                            'max_write_ops_count')
              self.actual_usage_comparision(
                  vm, disktype, 12 * disk_io_util_threshold * 1000 * 1000,
                  'max_write_bytes_count')

            else:
              data = self.limit_calculator(limits_data, mach_fam_json_data,
                                           disktype,
                                           int(total_disk_size[disktype]),
                                           search_str, next_hop, next_hop_val)

              op.info(
                  ('IOPS and Throughput limits available for VM DiskType - {},'
                   '\n\tTotal DiskSize: {}:'
                   '\n\n\t Max Read-IOPS Count: {},'
                   '\n\t Max Read-Throughput: {} MB/s,'
                   '\n\t Max Write-IOPS Count: {},'
                   '\n\t Max Write-Throughput: {} MB/s\n').format(
                       disktype, int(total_disk_size[disktype]),
                       min(data[0], data[1]), min(data[2], data[3]),
                       min(data[4], data[5]), min(data[6], data[7])))

              self.actual_usage_comparision(
                  vm, disktype,
                  min(data[0], data[1]) * disk_io_util_threshold,
                  'max_read_ops_count')
              self.actual_usage_comparision(
                  vm, disktype,
                  min(data[2], data[3]) * disk_io_util_threshold * 1000 * 1000,
                  'max_read_bytes_count')
              self.actual_usage_comparision(
                  vm, disktype,
                  min(data[4], data[5]) * disk_io_util_threshold,
                  'max_write_ops_count')
              self.actual_usage_comparision(
                  vm, disktype,
                  min(data[6], data[7]) * disk_io_util_threshold * 1000 * 1000,
                  'max_write_bytes_count')
          else:
            op.add_failed(
                vm,
                reason=
                ('The machine type {} is not supported with this gcpdiag runbook'
                ).format(vm.machine_type()),
                remediation=
                'You may only run this runbook for any of the below machine family:'
                'A2, A3, C2, C2D, C3, C3D, E2, F1, G1, G2,'
                ' H3, N1, N2, N2D, M1, M2, M3, T2D, T2A, Z3')
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



gcpdiag/runbook/gce/vm_performance.py [991:1063]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              self.actual_usage_comparision(
                  vm, disktype,
                  min(data[6], data[7]) * disk_io_util_threshold * 1000 * 1000,
                  'max_write_bytes_count')

            elif disktype == 'pd-standard' and int(
                total_disk_size[disktype]) < 100:
              # upto first 100GB, pd-standard disks have fixed IO limits
              op.info((
                  '\n\tIOPS and Throughput limits available for VM DiskType - {},'
                  '\n\tTotal DiskSize: {}:'
                  '\n\n\t Read-IOPS Count: {},'
                  '\n\t Read-Throughput: {} MB/s,'
                  '\n\t Write-IOPS Count: {},'
                  '\n\t Write-Throughput: {} MB/s\n').format(
                      disktype, int(total_disk_size[disktype]), 75, 12, 150,
                      12))

              self.actual_usage_comparision(vm, disktype,
                                            75 * disk_io_util_threshold,
                                            'max_read_ops_count')
              self.actual_usage_comparision(
                  vm, disktype, 12 * disk_io_util_threshold * 1000 * 1000,
                  'max_read_bytes_count')
              self.actual_usage_comparision(vm, disktype,
                                            150 * disk_io_util_threshold,
                                            'max_write_ops_count')
              self.actual_usage_comparision(
                  vm, disktype, 12 * disk_io_util_threshold * 1000 * 1000,
                  'max_write_bytes_count')
            else:
              data = self.limit_calculator(limits_data, mach_fam_json_data,
                                           disktype,
                                           int(total_disk_size[disktype]),
                                           search_str, next_hop, next_hop_val)

              op.info(
                  ('IOPS and Throughput limits available for VM DiskType - {},'
                   '\n\tTotal DiskSize: {}:'
                   '\n\n\t Max Read-IOPS Count: {},'
                   '\n\t Max Read-Throughput: {} MB/s,'
                   '\n\t Max Write-IOPS Count: {},'
                   '\n\t Max Write-Throughput: {} MB/s\n').format(
                       disktype, int(total_disk_size[disktype]),
                       min(data[0], data[1]), min(data[2], data[3]),
                       min(data[4], data[5]), min(data[6], data[7])))

              self.actual_usage_comparision(
                  vm, disktype,
                  min(data[0], data[1]) * disk_io_util_threshold,
                  'max_read_ops_count')
              self.actual_usage_comparision(
                  vm, disktype,
                  min(data[2], data[3]) * disk_io_util_threshold * 1000 * 1000,
                  'max_read_bytes_count')
              self.actual_usage_comparision(
                  vm, disktype,
                  min(data[4], data[5]) * disk_io_util_threshold,
                  'max_write_ops_count')
              self.actual_usage_comparision(
                  vm, disktype,
                  min(data[6], data[7]) * disk_io_util_threshold * 1000 * 1000,
                  'max_write_bytes_count')
          else:
            op.add_failed(
                vm,
                reason=
                ('The machine type {} is not supported with this gcpdiag runbook'
                ).format(vm.machine_type()),
                remediation=
                'You may only run this runbook for any of the below machine family:'
                'A2, A3, C2, C2D, C3, C3D, E2, F1, G1, G2,'
                ' H3, N1, N2, N2D, M1, M2, M3, T2D, T2A, Z3')
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



