service-capacity-modeling 0.3.55__py3-none-any.whl → 0.3.57__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 +36 -24
- service_capacity_modeling/models/org/netflix/kafka.py +11 -7
- {service_capacity_modeling-0.3.55.dist-info → service_capacity_modeling-0.3.57.dist-info}/METADATA +1 -1
- {service_capacity_modeling-0.3.55.dist-info → service_capacity_modeling-0.3.57.dist-info}/RECORD +8 -8
- {service_capacity_modeling-0.3.55.dist-info → service_capacity_modeling-0.3.57.dist-info}/WHEEL +0 -0
- {service_capacity_modeling-0.3.55.dist-info → service_capacity_modeling-0.3.57.dist-info}/entry_points.txt +0 -0
- {service_capacity_modeling-0.3.55.dist-info → service_capacity_modeling-0.3.57.dist-info}/licenses/LICENSE +0 -0
- {service_capacity_modeling-0.3.55.dist-info → service_capacity_modeling-0.3.57.dist-info}/top_level.txt +0 -0
|
@@ -206,8 +206,34 @@ def _estimate_cassandra_requirement( # pylint: disable=too-many-positional-argu
|
|
|
206
206
|
)
|
|
207
207
|
rps_working_set = min(1.0, disk_rps / max_rps_to_disk)
|
|
208
208
|
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
# Cassandra can defer writes either by buffering in memory or by
|
|
210
|
+
# waiting longer before recompacting (the min-threshold on the
|
|
211
|
+
# L0 compactions or STCS compactions)
|
|
212
|
+
min_threshold = 4
|
|
213
|
+
write_buffer_gib = _write_buffer_gib_zone(
|
|
214
|
+
desires=desires,
|
|
215
|
+
zones_per_region=zones_per_region,
|
|
216
|
+
flushes_before_compaction=min_threshold,
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
while write_buffer_gib > 12 and min_threshold < 16:
|
|
220
|
+
min_threshold *= 2
|
|
221
|
+
write_buffer_gib = _write_buffer_gib_zone(
|
|
222
|
+
desires=desires,
|
|
223
|
+
zones_per_region=zones_per_region,
|
|
224
|
+
flushes_before_compaction=min_threshold,
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
if current_capacity and current_capacity.cluster_instance and memory_preserve:
|
|
228
|
+
# remove base memory and heap from per node ram and then
|
|
229
|
+
# multiply by number of nodes in a zone to compute the zonal requirement.
|
|
230
|
+
reserve_memory = _get_base_memory(desires) + _cass_heap(
|
|
231
|
+
current_capacity.cluster_instance.ram_gib
|
|
232
|
+
)
|
|
233
|
+
needed_memory = (
|
|
234
|
+
current_capacity.cluster_instance.ram_gib - reserve_memory
|
|
235
|
+
) * current_capacity.cluster_instance_count.mid
|
|
236
|
+
write_buffer_gib = 0
|
|
211
237
|
else:
|
|
212
238
|
# If disk RPS will be smaller than our target because there are no
|
|
213
239
|
# reads, we don't need to hold as much data in memory.
|
|
@@ -227,24 +253,6 @@ def _estimate_cassandra_requirement( # pylint: disable=too-many-positional-argu
|
|
|
227
253
|
working_set,
|
|
228
254
|
)
|
|
229
255
|
|
|
230
|
-
# Cassandra can defer writes either by buffering in memory or by
|
|
231
|
-
# waiting longer before recompacting (the min-threshold on the
|
|
232
|
-
# L0 compactions or STCS compactions)
|
|
233
|
-
min_threshold = 4
|
|
234
|
-
write_buffer_gib = _write_buffer_gib_zone(
|
|
235
|
-
desires=desires,
|
|
236
|
-
zones_per_region=zones_per_region,
|
|
237
|
-
flushes_before_compaction=min_threshold,
|
|
238
|
-
)
|
|
239
|
-
|
|
240
|
-
while write_buffer_gib > 12 and min_threshold < 16:
|
|
241
|
-
min_threshold *= 2
|
|
242
|
-
write_buffer_gib = _write_buffer_gib_zone(
|
|
243
|
-
desires=desires,
|
|
244
|
-
zones_per_region=zones_per_region,
|
|
245
|
-
flushes_before_compaction=min_threshold,
|
|
246
|
-
)
|
|
247
|
-
|
|
248
256
|
return CapacityRequirement(
|
|
249
257
|
requirement_type="cassandra-zonal",
|
|
250
258
|
reference_shape=reference_shape,
|
|
@@ -358,10 +366,7 @@ def _estimate_cassandra_cluster_zonal( # pylint: disable=too-many-positional-ar
|
|
|
358
366
|
if desires.service_tier <= 1:
|
|
359
367
|
min_count = 2
|
|
360
368
|
|
|
361
|
-
base_mem = (
|
|
362
|
-
desires.data_shape.reserved_instance_app_mem_gib
|
|
363
|
-
+ desires.data_shape.reserved_instance_system_mem_gib
|
|
364
|
-
)
|
|
369
|
+
base_mem = _get_base_memory(desires)
|
|
365
370
|
|
|
366
371
|
heap_fn = _cass_heap_for_write_buffer(
|
|
367
372
|
instance=instance,
|
|
@@ -484,6 +489,13 @@ def _cass_io_per_read(node_size_gib, sstable_size_mb=160):
|
|
|
484
489
|
return 2 * levels
|
|
485
490
|
|
|
486
491
|
|
|
492
|
+
def _get_base_memory(desires: CapacityDesires):
|
|
493
|
+
return (
|
|
494
|
+
desires.data_shape.reserved_instance_app_mem_gib
|
|
495
|
+
+ desires.data_shape.reserved_instance_system_mem_gib
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
|
|
487
499
|
def _cass_heap_for_write_buffer(
|
|
488
500
|
instance: Instance,
|
|
489
501
|
write_buffer_gib: float,
|
|
@@ -188,7 +188,8 @@ def _estimate_kafka_requirement( # pylint: disable=too-many-positional-argument
|
|
|
188
188
|
) // zones_per_region
|
|
189
189
|
|
|
190
190
|
logger.debug(
|
|
191
|
-
"Need (cpu, mem, disk) = (%s, %s, %s)",
|
|
191
|
+
"Need (instance, cpu, mem, disk) = (%s, %s, %s, %s)",
|
|
192
|
+
instance.name,
|
|
192
193
|
needed_cores,
|
|
193
194
|
needed_memory,
|
|
194
195
|
needed_disk,
|
|
@@ -235,7 +236,7 @@ def _kafka_read_io(rps, io_size_kib, size_gib, recovery_seconds: int) -> float:
|
|
|
235
236
|
# pylint: disable=too-many-locals
|
|
236
237
|
# pylint: disable=too-many-return-statements
|
|
237
238
|
# pylint: disable=too-many-positional-arguments
|
|
238
|
-
def _estimate_kafka_cluster_zonal(
|
|
239
|
+
def _estimate_kafka_cluster_zonal( # noqa: C901
|
|
239
240
|
instance: Instance,
|
|
240
241
|
drive: Drive,
|
|
241
242
|
desires: CapacityDesires,
|
|
@@ -360,11 +361,14 @@ def _estimate_kafka_cluster_zonal(
|
|
|
360
361
|
if required_zone_size is not None:
|
|
361
362
|
space_gib = max(1, math.ceil(requirement.disk_gib.mid / required_zone_size))
|
|
362
363
|
ebs_gib = utils.next_n(space_gib, n=100)
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
364
|
+
|
|
365
|
+
# Max allowed disk size in `compute_stateful_zone`
|
|
366
|
+
if instance.drive is not None and instance.drive.size_gib > 0:
|
|
367
|
+
max_size = min(max_local_disk_gib, instance.drive.size_gib)
|
|
368
|
+
elif max_attached_disk_gib is not None:
|
|
369
|
+
max_size = max_attached_disk_gib
|
|
370
|
+
else:
|
|
371
|
+
max_size = drive.max_size_gib / 3
|
|
368
372
|
|
|
369
373
|
# Capacity planner only allows ~ 5TB disk (max_size) for gp3 drives
|
|
370
374
|
# or max_attached_disk_gib if provided.
|
{service_capacity_modeling-0.3.55.dist-info → service_capacity_modeling-0.3.57.dist-info}/RECORD
RENAMED
|
@@ -46,7 +46,7 @@ service_capacity_modeling/models/utils.py,sha256=0F__wz9KAGhPIQfvNp-FTtTANW6-sO4
|
|
|
46
46
|
service_capacity_modeling/models/org/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
47
|
service_capacity_modeling/models/org/netflix/__init__.py,sha256=m7IaQbo85NEbDvfoPJREIznpzg0YHTCrKP5C1GvnOYM,2378
|
|
48
48
|
service_capacity_modeling/models/org/netflix/aurora.py,sha256=Mi9zd48k64GkKIjAs3J1S2qThguNvyWIy2dUmhwrVhc,12883
|
|
49
|
-
service_capacity_modeling/models/org/netflix/cassandra.py,sha256=
|
|
49
|
+
service_capacity_modeling/models/org/netflix/cassandra.py,sha256=47R0jgdyL1kxekJ-2UvW-GC018qYG-iU_c8SZzcHQZk,33443
|
|
50
50
|
service_capacity_modeling/models/org/netflix/counter.py,sha256=hOVRRCgCPU-A5TdLKQXc_mWTQpkKOWRNjOeECdDP7kA,9205
|
|
51
51
|
service_capacity_modeling/models/org/netflix/crdb.py,sha256=2rD4Io0yT7o0NR4lNferXXOSTDe0SkT1LbSChvNgRrQ,19698
|
|
52
52
|
service_capacity_modeling/models/org/netflix/ddb.py,sha256=2jxMFz31xckJvymvVlu1yWm0X4dGYlqxDo0bftU1B9M,26307
|
|
@@ -55,7 +55,7 @@ service_capacity_modeling/models/org/netflix/entity.py,sha256=M0vzwhf8UAbVxnXspA
|
|
|
55
55
|
service_capacity_modeling/models/org/netflix/evcache.py,sha256=l3fzIVQ1PznD2tG00Fmwl728437MZrtHOS4WjXVa3fs,25229
|
|
56
56
|
service_capacity_modeling/models/org/netflix/graphkv.py,sha256=EVRo-1OCDvvotqPgIdP2_JXMfZUsG7KZxRMmlgYc3CI,8558
|
|
57
57
|
service_capacity_modeling/models/org/netflix/iso_date_math.py,sha256=CPGHLmbGeNqkcYcmCkLKhPZcAU-yTJ2HjvuXdnNyCYc,996
|
|
58
|
-
service_capacity_modeling/models/org/netflix/kafka.py,sha256=
|
|
58
|
+
service_capacity_modeling/models/org/netflix/kafka.py,sha256=cIvO88g7YhEOYsMAVbZ5a4YyJCvbKaTmwQjk73gg_7s,25545
|
|
59
59
|
service_capacity_modeling/models/org/netflix/key_value.py,sha256=yL5moU0SJD4ocBU9zeGhPYE4KY7oSSq5yqfVWd_Ot2g,9336
|
|
60
60
|
service_capacity_modeling/models/org/netflix/postgres.py,sha256=R3Tog-ZW1Yx6gO3AKqI_wquSm30s01QX9yWR7Jvgk9A,4055
|
|
61
61
|
service_capacity_modeling/models/org/netflix/rds.py,sha256=z9egFBg4Ltqyuz_WHk-_hw-xL-EQNzl1JopJoWdNli8,10768
|
|
@@ -69,9 +69,9 @@ service_capacity_modeling/tools/auto_shape.py,sha256=Rk5Fjrw2susVL8It_J2KUADoMGB
|
|
|
69
69
|
service_capacity_modeling/tools/fetch_pricing.py,sha256=SHOtFaPr61op2bnY9i_g_1-d-Nz2rV8c7Jwsye2R49s,3763
|
|
70
70
|
service_capacity_modeling/tools/generate_missing.py,sha256=WN7Y0iPjelJu9d2Yq5dcu_EBIQPX2VxKgOou4NMNOM4,2860
|
|
71
71
|
service_capacity_modeling/tools/instance_families.py,sha256=e9JWSIdljSmHI8Nb2MI5Ld9JqQ7WdOtPtV7g3oR7ZiU,7764
|
|
72
|
-
service_capacity_modeling-0.3.
|
|
73
|
-
service_capacity_modeling-0.3.
|
|
74
|
-
service_capacity_modeling-0.3.
|
|
75
|
-
service_capacity_modeling-0.3.
|
|
76
|
-
service_capacity_modeling-0.3.
|
|
77
|
-
service_capacity_modeling-0.3.
|
|
72
|
+
service_capacity_modeling-0.3.57.dist-info/licenses/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
|
|
73
|
+
service_capacity_modeling-0.3.57.dist-info/METADATA,sha256=tr5ozlxdOKouYczdfdH_nz6Vp_Ldi8EzE8BKy2so6HQ,9590
|
|
74
|
+
service_capacity_modeling-0.3.57.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
75
|
+
service_capacity_modeling-0.3.57.dist-info/entry_points.txt,sha256=ZsjzpG5SomWpT1zCE19n1uSXKH2gTI_yc33sdl0vmJg,146
|
|
76
|
+
service_capacity_modeling-0.3.57.dist-info/top_level.txt,sha256=H8XjTCLgR3enHq5t3bIbxt9SeUkUT8HT_SDv2dgIT_A,26
|
|
77
|
+
service_capacity_modeling-0.3.57.dist-info/RECORD,,
|
{service_capacity_modeling-0.3.55.dist-info → service_capacity_modeling-0.3.57.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|