service-capacity-modeling 0.3.78__tar.gz → 0.3.79__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of service-capacity-modeling might be problematic. Click here for more details.
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/PKG-INFO +1 -1
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/counter.py +40 -18
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling.egg-info/PKG-INFO +1 -1
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/LICENSE +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/README.md +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/__init__.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/capacity_planner.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/__init__.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/__init__.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/pricing/aws/3yr-reserved_ec2.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/pricing/aws/3yr-reserved_zz-overrides.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/profiles.txt +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c5.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c5a.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c5d.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c5n.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c6a.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c6i.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c6id.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c7a.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c7i.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_c8i.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_i3en.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_i4i.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_i7i.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m4.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m5.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m5n.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6a.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6i.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6id.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6idn.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m6in.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m7a.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m7i.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_m8i.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r4.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r5.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r5n.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6a.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6i.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6id.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6idn.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r6in.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r7a.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r7i.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/auto_r8i.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/manual_drives.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/manual_instances.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/hardware/profiles/shapes/aws/manual_services.json +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/interface.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/__init__.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/common.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/headroom_strategy.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/__init__.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/__init__.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/aurora.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/cassandra.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/crdb.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/ddb.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/elasticsearch.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/entity.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/evcache.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/graphkv.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/iso_date_math.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/kafka.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/key_value.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/postgres.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/rds.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/stateless_java.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/time_series.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/time_series_config.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/wal.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/org/netflix/zookeeper.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/models/utils.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/stats.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/tools/__init__.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/tools/auto_shape.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/tools/fetch_pricing.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/tools/generate_missing.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling/tools/instance_families.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling.egg-info/SOURCES.txt +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling.egg-info/dependency_links.txt +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling.egg-info/entry_points.txt +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling.egg-info/requires.txt +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/service_capacity_modeling.egg-info/top_level.txt +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/setup.cfg +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/setup.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_arguments.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_buffers.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_common.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_desire_merge.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_generate_scenarios.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_hardware.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_hardware_shapes.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_headroom_strategy.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_io2.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_model_dump.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_reproducible.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_simulation.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_utils.py +0 -0
- {service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_working_set.py +0 -0
|
@@ -46,7 +46,8 @@ class NflxCounterArguments(NflxJavaAppArguments):
|
|
|
46
46
|
)
|
|
47
47
|
counter_cardinality: NflxCounterCardinality = Field(
|
|
48
48
|
alias="counter.cardinality",
|
|
49
|
-
description="Low means <
|
|
49
|
+
description="Low means < 10,000, medium (10,000—1,000,000), high means "
|
|
50
|
+
"> 1,000,000.",
|
|
50
51
|
)
|
|
51
52
|
counter_mode: NflxCounterMode = Field(
|
|
52
53
|
alias="counter.mode",
|
|
@@ -92,36 +93,57 @@ class NflxCounterCapacityModel(CapacityModel):
|
|
|
92
93
|
def compose_with(
|
|
93
94
|
user_desires: CapacityDesires, extra_model_arguments: Dict[str, Any]
|
|
94
95
|
) -> Tuple[Tuple[str, Callable[[CapacityDesires], CapacityDesires]], ...]:
|
|
95
|
-
stores = [
|
|
96
|
-
if extra_model_arguments["counter.mode"] != NflxCounterMode.best_effort.value:
|
|
96
|
+
stores = []
|
|
97
97
|
|
|
98
|
+
if extra_model_arguments["counter.mode"] == NflxCounterMode.best_effort.value:
|
|
99
|
+
stores.append(("org.netflix.evcache", lambda x: x))
|
|
100
|
+
else:
|
|
101
|
+
# Shared evcache cluster is used for eventual and exact counters
|
|
98
102
|
def _modify_cassandra_desires(
|
|
99
103
|
user_desires: CapacityDesires,
|
|
100
104
|
) -> CapacityDesires:
|
|
101
105
|
modified = user_desires.model_copy(deep=True)
|
|
106
|
+
counter_cardinality = extra_model_arguments["counter.cardinality"]
|
|
107
|
+
|
|
108
|
+
counter_deltas_per_second = (
|
|
109
|
+
user_desires.query_pattern.estimated_write_per_second
|
|
110
|
+
)
|
|
102
111
|
|
|
103
|
-
#
|
|
104
|
-
|
|
112
|
+
# low cardinality : rollups happen once every 60 seconds
|
|
113
|
+
# medium cardinality : rollups happen once every 30 seconds
|
|
114
|
+
# high cardinality : rollups happen once every 10 seconds
|
|
115
|
+
# TODO: Account for read amplification from time slice configs
|
|
116
|
+
# for better model accuracy
|
|
117
|
+
if counter_cardinality == NflxCounterCardinality.low.value:
|
|
118
|
+
rollups_per_second = counter_deltas_per_second.scale(0.0167)
|
|
119
|
+
elif counter_cardinality == NflxCounterCardinality.medium.value:
|
|
120
|
+
rollups_per_second = counter_deltas_per_second.scale(0.0333)
|
|
121
|
+
else:
|
|
122
|
+
rollups_per_second = counter_deltas_per_second.scale(0.1)
|
|
105
123
|
|
|
106
|
-
|
|
107
|
-
rps = cps.scale(0.1)
|
|
108
|
-
modified.query_pattern.estimated_read_per_second = rps
|
|
124
|
+
modified.query_pattern.estimated_read_per_second = rollups_per_second
|
|
109
125
|
|
|
110
126
|
# storage size fix
|
|
111
|
-
|
|
112
|
-
|
|
127
|
+
delta_event_size = 256 # bytes
|
|
128
|
+
rolled_up_count_size = 128 # bytes
|
|
113
129
|
GiB = 1024 * 1024 * 1024
|
|
114
|
-
|
|
130
|
+
|
|
131
|
+
# Events can be discarded as soon as rollup is complete
|
|
132
|
+
# We default to a 1 day slice with 2 day retention
|
|
133
|
+
retention = timedelta(days=2).total_seconds()
|
|
134
|
+
|
|
115
135
|
cardinality = {
|
|
116
|
-
"low":
|
|
117
|
-
"medium":
|
|
118
|
-
"high":
|
|
136
|
+
"low": 10_000,
|
|
137
|
+
"medium": 100_000,
|
|
138
|
+
"high": 1_000_000,
|
|
119
139
|
}[extra_model_arguments["counter.cardinality"]]
|
|
120
140
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
141
|
+
event_storage_size = counter_deltas_per_second.scale(
|
|
142
|
+
delta_event_size * retention / GiB
|
|
143
|
+
)
|
|
144
|
+
rollup_storage_size = rolled_up_count_size * cardinality / GiB
|
|
145
|
+
total_store_size = event_storage_size.offset(rollup_storage_size)
|
|
146
|
+
modified.data_shape.estimated_state_size_gib = total_store_size
|
|
125
147
|
|
|
126
148
|
return modified
|
|
127
149
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_arguments.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_desire_merge.py
RENAMED
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_hardware.py
RENAMED
|
File without changes
|
{service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_hardware_shapes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_model_dump.py
RENAMED
|
File without changes
|
{service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_reproducible.py
RENAMED
|
File without changes
|
{service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_simulation.py
RENAMED
|
File without changes
|
|
File without changes
|
{service_capacity_modeling-0.3.78 → service_capacity_modeling-0.3.79}/tests/test_working_set.py
RENAMED
|
File without changes
|