Skip to content

Commit

Permalink
Fix max instance count
Browse files Browse the repository at this point in the history
  • Loading branch information
akashdeepgoel committed Oct 10, 2023
1 parent 32a8c4a commit 0378315
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions service_capacity_modeling/models/org/netflix/evcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def _estimate_evcache_cluster_zonal(
zones_per_region: int = 3,
copies_per_region: int = 3,
max_local_disk_gib: int = 2048,
max_regional_size: int = 999,
max_regional_size: int = 10000,
min_instance_memory_gib: int = 12,
cross_region_replication: Replication = Replication.none,
) -> Optional[CapacityPlan]:
Expand All @@ -175,6 +175,9 @@ def _estimate_evcache_cluster_zonal(
if instance.ram_gib < min_instance_memory_gib:
return None

if instance.drive is None:
return None

# Based on the disk latency and the read latency SLOs we adjust our
# working set to keep more or less data in RAM. Faster drives need
# less fronting RAM.
Expand Down Expand Up @@ -234,8 +237,6 @@ def reserve_memory(instance_mem_gib):
needed_network_mbps=requirement.network_mbps.mid,
# EVCache doesn't use cloud drives to store data, we will have
# accounted for the data going on drives or memory via working set
required_disk_ios=lambda x, y: (0, 0),
required_disk_space=lambda x: 0,
max_local_disk_gib=max_local_disk_gib,
# EVCache clusters should be balanced per zone
cluster_size=lambda x: next_n(x, zones_per_region),
Expand Down Expand Up @@ -305,7 +306,7 @@ class NflxEVCacheArguments(BaseModel):
" this will be deduced from tier",
)
max_regional_size: int = Field(
default=999,
default=10000,
description="What is the maximum size of a cluster in this region",
)
max_local_disk_gib: int = Field(
Expand Down Expand Up @@ -341,7 +342,7 @@ def capacity_plan(
copies_per_region: int = extra_model_arguments.get(
"copies_per_region", default_copies
)
max_regional_size: int = extra_model_arguments.get("max_regional_size", 999)
max_regional_size: int = extra_model_arguments.get("max_regional_size", 10000)
# Very large nodes are hard to cache warm
max_local_disk_gib: int = extra_model_arguments.get(
"max_local_disk_gib", 1024 * 6
Expand Down

0 comments on commit 0378315

Please sign in to comment.