diff --git a/service_capacity_modeling/hardware/__init__.py b/service_capacity_modeling/hardware/__init__.py index acc905e..2092e15 100644 --- a/service_capacity_modeling/hardware/__init__.py +++ b/service_capacity_modeling/hardware/__init__.py @@ -56,6 +56,9 @@ def price_hardware(hardware: Hardware, pricing: Pricing) -> GlobalHardware: priced_services[ svc ].annual_cost_per_write_io = svc_price.annual_cost_per_write_io + priced_services[ + svc + ].annual_cost_per_core = svc_price.annual_cost_per_core regions[region] = Hardware( instances=priced_instances, diff --git a/service_capacity_modeling/hardware/profiles/pricing/aws/3yr-reserved.json b/service_capacity_modeling/hardware/profiles/pricing/aws/3yr-reserved.json index 864803b..a4201e7 100644 --- a/service_capacity_modeling/hardware/profiles/pricing/aws/3yr-reserved.json +++ b/service_capacity_modeling/hardware/profiles/pricing/aws/3yr-reserved.json @@ -99,6 +99,9 @@ }, "net.intra.region": { "annual_cost_per_gib": 0.02 + }, + "crdb_core_license": { + "annual_cost_per_core": 0 } }, "zones_in_region": 3 diff --git a/service_capacity_modeling/hardware/profiles/shapes/aws.json b/service_capacity_modeling/hardware/profiles/shapes/aws.json index 254e759..ee0c373 100644 --- a/service_capacity_modeling/hardware/profiles/shapes/aws.json +++ b/service_capacity_modeling/hardware/profiles/shapes/aws.json @@ -831,6 +831,9 @@ }, "net.intra.region": { "name": "Intra-region (within) transfer costs" + }, + "crdb_core_license": { + "name": "CRDB license fee" } } } diff --git a/service_capacity_modeling/interface.py b/service_capacity_modeling/interface.py index fe218f3..23bde34 100644 --- a/service_capacity_modeling/interface.py +++ b/service_capacity_modeling/interface.py @@ -316,6 +316,7 @@ class Service(ExcludeUnsetModel): annual_cost_per_gib: float = 0 annual_cost_per_read_io: float = 0 annual_cost_per_write_io: float = 0 + annual_cost_per_core: float = 0 # These defaults assume a cloud blob storage like S3 read_io_latency_ms: FixedInterval = FixedInterval( @@ -377,6 +378,7 @@ class ServicePricing(ExcludeUnsetModel): annual_cost_per_gib: float = 0 annual_cost_per_read_io: float = 0 annual_cost_per_write_io: float = 0 + annual_cost_per_core: float = 0 class HardwarePricing(ExcludeUnsetModel): diff --git a/service_capacity_modeling/models/org/netflix/crdb.py b/service_capacity_modeling/models/org/netflix/crdb.py index 33d943a..4e81cc2 100644 --- a/service_capacity_modeling/models/org/netflix/crdb.py +++ b/service_capacity_modeling/models/org/netflix/crdb.py @@ -285,7 +285,7 @@ def capacity_plan( max_local_disk_gib: int = extra_model_arguments.get("max_local_disk_gib", 2048) # Cockroach Labs recommends a minimum of 8 vCPUs and strongly recommends no fewer than 4 vCPUs per node. min_vcpu_per_instance: int = extra_model_arguments.get("min_vcpu_per_instance", 4) - license_fee_per_core: float = extra_model_arguments.get("license_fee_per_core", 0.0) + license_fee_per_core: float = context.services["crdb_core_license"].annual_cost_per_core return _estimate_cockroachdb_cluster_zonal( instance=instance,