Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions oracle/storagemanager/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,43 +73,43 @@ func (o *oracleStorageManager) RecommendStoragePoolUpdate(request *cloudops.Stor
func determineIOPSForPool(instStorage *cloudops.StoragePoolSpec, row *cloudops.StorageDecisionMatrixRow) uint64 {
var iopsPerGB, maxIopsPerVol int64
switch row.DriveType {
case "0_vpus":
case "pv-0":
iopsPerGB = 2
maxIopsPerVol = 3000
case "10_vpus":
case "pv-10":
iopsPerGB = 60
maxIopsPerVol = 25000
case "20_vpus":
case "pv-20":
iopsPerGB = 75
maxIopsPerVol = 50000
case "30_vpus":
case "pv-30":
iopsPerGB = 90
maxIopsPerVol = 75000
case "40_vpus":
case "pv-40":
iopsPerGB = 105
maxIopsPerVol = 100000
case "50_vpus":
case "pv-50":
iopsPerGB = 120
maxIopsPerVol = 125000
case "60_vpus":
case "pv-60":
iopsPerGB = 135
maxIopsPerVol = 150000
case "70_vpus":
case "pv-70":
iopsPerGB = 150
maxIopsPerVol = 175000
case "80_vpus":
case "pv-80":
iopsPerGB = 165
maxIopsPerVol = 200000
case "90_vpus":
case "pv-90":
iopsPerGB = 180
maxIopsPerVol = 225000
case "100_vpus":
case "pv-100":
iopsPerGB = 195
maxIopsPerVol = 250000
case "110_vpus":
case "pv-110":
iopsPerGB = 210
maxIopsPerVol = 275000
case "120_vpus":
case "pv-120":
iopsPerGB = 225
maxIopsPerVol = 300000
}
Expand Down
52 changes: 26 additions & 26 deletions oracle/storagemanager/oracle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func storageDistribution(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 250,
DriveType: "0_vpus",
DriveType: "pv-0",
InstancesPerZone: 3,
DriveCount: 1,
IOPS: 500,
Expand Down Expand Up @@ -99,7 +99,7 @@ func storageDistribution(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 14,
DriveType: "0_vpus",
DriveType: "pv-0",
InstancesPerZone: 3,
DriveCount: 8,
IOPS: 28,
Expand Down Expand Up @@ -127,7 +127,7 @@ func storageDistribution(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 1250,
DriveType: "0_vpus",
DriveType: "pv-0",
InstancesPerZone: 3,
DriveCount: 1,
IOPS: 2500,
Expand All @@ -154,7 +154,7 @@ func storageDistribution(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 250,
DriveType: "10_vpus",
DriveType: "pv-10",
InstancesPerZone: 2,
DriveCount: 8,
IOPS: 15000,
Expand Down Expand Up @@ -182,7 +182,7 @@ func storageDistribution(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 349,
DriveType: "0_vpus",
DriveType: "pv-0",
InstancesPerZone: 2,
DriveCount: 1,
IOPS: 698,
Expand All @@ -209,7 +209,7 @@ func storageDistribution(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 128,
DriveType: "10_vpus",
DriveType: "pv-10",
InstancesPerZone: 2,
DriveCount: 8,
IOPS: 7680,
Expand Down Expand Up @@ -248,7 +248,7 @@ func storageUpdate(t *testing.T) {
DesiredCapacity: 1536,
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_RESIZE_DISK,
CurrentDriveSize: 256,
CurrentDriveType: "20_vpus",
CurrentDriveType: "pv-20",
CurrentIOPS: 768,
CurrentDriveCount: 3,
},
Expand All @@ -257,7 +257,7 @@ func storageUpdate(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 512,
DriveType: "20_vpus",
DriveType: "pv-20",
DriveCount: 3,
IOPS: 38400,
},
Expand All @@ -273,7 +273,7 @@ func storageUpdate(t *testing.T) {
DesiredCapacity: 800,
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_RESIZE_DISK,
CurrentDriveSize: 350,
CurrentDriveType: "20_vpus",
CurrentDriveType: "pv-20",
CurrentDriveCount: 2,
TotalDrivesOnNode: 2,
},
Expand All @@ -282,7 +282,7 @@ func storageUpdate(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 400,
DriveType: "20_vpus",
DriveType: "pv-20",
DriveCount: 2,
IOPS: 30000,
},
Expand All @@ -298,7 +298,7 @@ func storageUpdate(t *testing.T) {
DesiredCapacity: 1200,
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_RESIZE_DISK,
CurrentDriveSize: 300,
CurrentDriveType: "20_vpus",
CurrentDriveType: "pv-20",
CurrentDriveCount: 3,
TotalDrivesOnNode: 3,
},
Expand All @@ -307,7 +307,7 @@ func storageUpdate(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 400,
DriveType: "20_vpus",
DriveType: "pv-20",
DriveCount: 3,
IOPS: 30000,
},
Expand All @@ -324,7 +324,7 @@ func storageUpdate(t *testing.T) {
DesiredCapacity: 4096,
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_ADD_DISK,
CurrentDriveSize: 1024,
CurrentDriveType: "50_vpus",
CurrentDriveType: "pv-50",
CurrentDriveCount: 2,
TotalDrivesOnNode: 2,
},
Expand All @@ -333,7 +333,7 @@ func storageUpdate(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 1024,
DriveType: "50_vpus",
DriveType: "pv-50",
DriveCount: 2,
IOPS: 122880,
},
Expand All @@ -349,7 +349,7 @@ func storageUpdate(t *testing.T) {
DesiredCapacity: 3072,
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_ADD_DISK,
CurrentDriveSize: 1024,
CurrentDriveType: "50_vpus",
CurrentDriveType: "pv-50",
CurrentDriveCount: 2,
TotalDrivesOnNode: 2,
},
Expand All @@ -358,7 +358,7 @@ func storageUpdate(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 1024,
DriveType: "50_vpus",
DriveType: "pv-50",
DriveCount: 1,
IOPS: 122880,
},
Expand All @@ -374,7 +374,7 @@ func storageUpdate(t *testing.T) {
DesiredCapacity: 2000,
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_ADD_DISK,
CurrentDriveSize: 600,
CurrentDriveType: "20_vpus",
CurrentDriveType: "pv-20",
CurrentDriveCount: 3,
TotalDrivesOnNode: 3,
},
Expand All @@ -383,7 +383,7 @@ func storageUpdate(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 600,
DriveType: "20_vpus",
DriveType: "pv-20",
DriveCount: 1,
IOPS: 45000,
},
Expand All @@ -405,7 +405,7 @@ func storageUpdate(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 700,
DriveType: "0_vpus",
DriveType: "pv-0",
DriveCount: 1,
IOPS: 1400,
},
Expand Down Expand Up @@ -459,7 +459,7 @@ func storageUpdate(t *testing.T) {
DesiredCapacity: 280,
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_RESIZE_DISK,
CurrentDriveSize: 256,
CurrentDriveType: "20_vpus",
CurrentDriveType: "pv-20",
CurrentDriveCount: 1,
TotalDrivesOnNode: 1,
},
Expand All @@ -468,7 +468,7 @@ func storageUpdate(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 280,
DriveType: "20_vpus",
DriveType: "pv-20",
DriveCount: 1,
IOPS: 21000,
},
Expand All @@ -484,7 +484,7 @@ func storageUpdate(t *testing.T) {
DesiredCapacity: 400,
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_ADD_DISK,
CurrentDriveSize: 200,
CurrentDriveType: "0_vpus",
CurrentDriveType: "pv-0",
CurrentDriveCount: 1,
TotalDrivesOnNode: 1,
},
Expand All @@ -493,7 +493,7 @@ func storageUpdate(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 200,
DriveType: "0_vpus",
DriveType: "pv-0",
DriveCount: 1,
IOPS: 400,
},
Expand All @@ -509,7 +509,7 @@ func storageUpdate(t *testing.T) {
DesiredCapacity: 401,
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_ADD_DISK,
CurrentDriveSize: 200,
CurrentDriveType: "0_vpus",
CurrentDriveType: "pv-0",
CurrentDriveCount: 2,
TotalDrivesOnNode: 2,
},
Expand All @@ -518,7 +518,7 @@ func storageUpdate(t *testing.T) {
InstanceStorage: []*cloudops.StoragePoolSpec{
&cloudops.StoragePoolSpec{
DriveCapacityGiB: 200,
DriveType: "0_vpus",
DriveType: "pv-0",
DriveCount: 1,
IOPS: 400,
},
Expand All @@ -534,7 +534,7 @@ func storageUpdate(t *testing.T) {
DesiredCapacity: 401,
ResizeOperationType: api.SdkStoragePool_RESIZE_TYPE_ADD_DISK,
CurrentDriveSize: 200,
CurrentDriveType: "0_vpus",
CurrentDriveType: "pv-0",
CurrentDriveCount: 3,
TotalDrivesOnNode: 3,
},
Expand Down
4 changes: 2 additions & 2 deletions oracle/storagemanager/spec/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

const (
oracleYamlPath = "oracle.yaml"
vpusSuffix = "_vpus"
vpusPrefix = "pv-"
)

func main() {
Expand Down Expand Up @@ -76,7 +76,7 @@ func getMatrixRows(vpu int) []cloudops.StorageDecisionMatrixRow {
row := getCommonRow(0)

for iops := int64(0); iops < int64(maxIopsPerVol); iops = iops + 500 {
row.DriveType = fmt.Sprintf("%d%s", vpu, vpusSuffix)
row.DriveType = fmt.Sprintf("%s%d", vpusPrefix, vpu)
row.MinIOPS = uint64(iops)
row.MaxIOPS = uint64(iops + 500)
row.MinSize = uint64(math.Ceil(float64(row.MinIOPS) / float64(iopsPerGB)))
Expand Down
Loading