service-capacity-modeling 0.3.77__py3-none-any.whl → 0.3.79__py3-none-any.whl
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/models/org/netflix/cassandra.py +3 -3
- service_capacity_modeling/models/org/netflix/counter.py +40 -18
- {service_capacity_modeling-0.3.77.dist-info → service_capacity_modeling-0.3.79.dist-info}/METADATA +1 -1
- {service_capacity_modeling-0.3.77.dist-info → service_capacity_modeling-0.3.79.dist-info}/RECORD +8 -8
- {service_capacity_modeling-0.3.77.dist-info → service_capacity_modeling-0.3.79.dist-info}/WHEEL +0 -0
- {service_capacity_modeling-0.3.77.dist-info → service_capacity_modeling-0.3.79.dist-info}/entry_points.txt +0 -0
- {service_capacity_modeling-0.3.77.dist-info → service_capacity_modeling-0.3.79.dist-info}/licenses/LICENSE +0 -0
- {service_capacity_modeling-0.3.77.dist-info → service_capacity_modeling-0.3.79.dist-info}/top_level.txt +0 -0
|
@@ -377,7 +377,7 @@ def _estimate_cassandra_cluster_zonal( # pylint: disable=too-many-positional-ar
|
|
|
377
377
|
desires: CapacityDesires,
|
|
378
378
|
zones_per_region: int = 3,
|
|
379
379
|
copies_per_region: int = 3,
|
|
380
|
-
require_local_disks: bool =
|
|
380
|
+
require_local_disks: bool = False,
|
|
381
381
|
require_attached_disks: bool = False,
|
|
382
382
|
required_cluster_size: Optional[int] = None,
|
|
383
383
|
max_rps_to_disk: int = 500,
|
|
@@ -644,7 +644,7 @@ class NflxCassandraArguments(BaseModel):
|
|
|
644
644
|
" this will be deduced from durability and consistency desires",
|
|
645
645
|
)
|
|
646
646
|
require_local_disks: bool = Field(
|
|
647
|
-
default=
|
|
647
|
+
default=False,
|
|
648
648
|
description="If local (ephemeral) drives are required",
|
|
649
649
|
)
|
|
650
650
|
require_attached_disks: bool = Field(
|
|
@@ -732,7 +732,7 @@ class NflxCassandraCapacityModel(CapacityModel):
|
|
|
732
732
|
desires, extra_model_arguments.get("copies_per_region", None)
|
|
733
733
|
)
|
|
734
734
|
require_local_disks: bool = extra_model_arguments.get(
|
|
735
|
-
"require_local_disks",
|
|
735
|
+
"require_local_disks", False
|
|
736
736
|
)
|
|
737
737
|
require_attached_disks: bool = extra_model_arguments.get(
|
|
738
738
|
"require_attached_disks", False
|
|
@@ -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
|
|
{service_capacity_modeling-0.3.77.dist-info → service_capacity_modeling-0.3.79.dist-info}/RECORD
RENAMED
|
@@ -52,8 +52,8 @@ service_capacity_modeling/models/utils.py,sha256=WosEEg4o1_WSbTb5mL-M1v8JuWJgvS2
|
|
|
52
52
|
service_capacity_modeling/models/org/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
53
|
service_capacity_modeling/models/org/netflix/__init__.py,sha256=W6rKkhSdPhjD-awm7mYakAhw7VKLNJYkqv-U3LfkMew,2444
|
|
54
54
|
service_capacity_modeling/models/org/netflix/aurora.py,sha256=Js33ZjxCtt34HiDPsWRT9mjKCAsnnCo9du15QArVFMo,13073
|
|
55
|
-
service_capacity_modeling/models/org/netflix/cassandra.py,sha256=
|
|
56
|
-
service_capacity_modeling/models/org/netflix/counter.py,sha256=
|
|
55
|
+
service_capacity_modeling/models/org/netflix/cassandra.py,sha256=Fp37bHtWRJctJYYJhW78YbLeFXoX26QxREP_BMEItNE,39003
|
|
56
|
+
service_capacity_modeling/models/org/netflix/counter.py,sha256=XopKlNMdvO5EbxAggn-KW_q7L3aKtXLXbry4ocl6i5Q,10494
|
|
57
57
|
service_capacity_modeling/models/org/netflix/crdb.py,sha256=iW7tyG8jpXhHIdXrw3DPYSHRAknPN42MlCRLJO4o9C8,20826
|
|
58
58
|
service_capacity_modeling/models/org/netflix/ddb.py,sha256=9qRiuTqWev9zbYFFzewyowU7M41uALsuLklYx20yAXw,26502
|
|
59
59
|
service_capacity_modeling/models/org/netflix/elasticsearch.py,sha256=zPrC6b2LNrAh3IWE3HCMUEYASacjYbHChbO4WZSMma4,25234
|
|
@@ -75,9 +75,9 @@ service_capacity_modeling/tools/auto_shape.py,sha256=Jx9H2ay9-H_kUDjtB141owQNxGF
|
|
|
75
75
|
service_capacity_modeling/tools/fetch_pricing.py,sha256=Qp-XMymkY1dvtyS51RufmEpfgOHv-IQ-XyzS8wp2-qM,4021
|
|
76
76
|
service_capacity_modeling/tools/generate_missing.py,sha256=F7YqvMJAV4nZc20GNrlIsnQSF8_77sLgwYZqc5k4LDg,3099
|
|
77
77
|
service_capacity_modeling/tools/instance_families.py,sha256=e5RuYkCLUITvsAazDH12B6KjX_PaBsv6Ne3mj0HK_sQ,9223
|
|
78
|
-
service_capacity_modeling-0.3.
|
|
79
|
-
service_capacity_modeling-0.3.
|
|
80
|
-
service_capacity_modeling-0.3.
|
|
81
|
-
service_capacity_modeling-0.3.
|
|
82
|
-
service_capacity_modeling-0.3.
|
|
83
|
-
service_capacity_modeling-0.3.
|
|
78
|
+
service_capacity_modeling-0.3.79.dist-info/licenses/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
|
|
79
|
+
service_capacity_modeling-0.3.79.dist-info/METADATA,sha256=nM1qflhu7AXKNcD-AqIXyg_EZQ_ITg77Rj8b8ur_D8A,10361
|
|
80
|
+
service_capacity_modeling-0.3.79.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
81
|
+
service_capacity_modeling-0.3.79.dist-info/entry_points.txt,sha256=ZsjzpG5SomWpT1zCE19n1uSXKH2gTI_yc33sdl0vmJg,146
|
|
82
|
+
service_capacity_modeling-0.3.79.dist-info/top_level.txt,sha256=H8XjTCLgR3enHq5t3bIbxt9SeUkUT8HT_SDv2dgIT_A,26
|
|
83
|
+
service_capacity_modeling-0.3.79.dist-info/RECORD,,
|
{service_capacity_modeling-0.3.77.dist-info → service_capacity_modeling-0.3.79.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|