service-capacity-modeling 0.3.54__py3-none-any.whl → 0.3.55__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.

@@ -144,6 +144,7 @@ def _estimate_cassandra_requirement( # pylint: disable=too-many-positional-argu
144
144
  disk_buffer = buffer_for_components(
145
145
  buffers=desires.buffers, components=[BufferComponent.disk]
146
146
  )
147
+ memory_preserve = False
147
148
  reference_shape = desires.reference_shape
148
149
  current_capacity = (
149
150
  None
@@ -169,6 +170,9 @@ def _estimate_cassandra_requirement( # pylint: disable=too-many-positional-argu
169
170
  * current_capacity.cluster_instance_count.mid
170
171
  * (disk_scale or 1)
171
172
  )
173
+ _, memory_preserve = derived_buffer_for_component(
174
+ desires.buffers.derived, ["storage", "memory"]
175
+ )
172
176
  else:
173
177
  # If the cluster is not yet provisioned
174
178
  capacity_requirement = _zonal_requirement_for_new_cluster(
@@ -202,13 +206,19 @@ def _estimate_cassandra_requirement( # pylint: disable=too-many-positional-argu
202
206
  )
203
207
  rps_working_set = min(1.0, disk_rps / max_rps_to_disk)
204
208
 
205
- # If disk RPS will be smaller than our target because there are no
206
- # reads, we don't need to hold as much data in memory.
207
- # For c*, we can skip memory buffer and can just keep using the heap and write buffer calc
208
- # Eventually we'll want to phrase those heap, read cache, and write cache as buffers
209
- needed_memory = min(working_set, rps_working_set) * disk_used_gib * zones_per_region
210
- # Now convert to per zone
211
- needed_memory = max(1, int(needed_memory // zones_per_region))
209
+ if memory_preserve:
210
+ needed_memory = capacity_requirement.mem_gib.mid
211
+ else:
212
+ # If disk RPS will be smaller than our target because there are no
213
+ # reads, we don't need to hold as much data in memory.
214
+ # For c*, we can skip memory buffer and can just keep using the heap and write buffer calc
215
+ # Eventually we'll want to phrase those heap, read cache, and write cache as buffers
216
+ needed_memory = (
217
+ min(working_set, rps_working_set) * disk_used_gib * zones_per_region
218
+ )
219
+ # Now convert to per zone
220
+ needed_memory = max(1, int(needed_memory // zones_per_region))
221
+
212
222
  logger.debug(
213
223
  "Need (cpu, mem, disk, working) = (%s, %s, %s, %f)",
214
224
  needed_cores,
@@ -381,6 +391,7 @@ def _estimate_cassandra_cluster_zonal( # pylint: disable=too-many-positional-ar
381
391
  # C* clusters provision in powers of 2 because doubling
382
392
  cluster_size=next_power_of_2,
383
393
  min_count=max(min_count, required_cluster_size or 0),
394
+ # TODO: Take reserve memory calculation into account during buffer calculation
384
395
  # C* heap usage takes away from OS page cache memory
385
396
  reserve_memory=lambda x: base_mem + heap_fn(x),
386
397
  # C* heap buffers the writes at roughly a rate of
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: service-capacity-modeling
3
- Version: 0.3.54
3
+ Version: 0.3.55
4
4
  Summary: Contains utilities for modeling capacity for pluggable workloads
5
5
  Author: Joseph Lynch
6
6
  Author-email: josephl@netflix.com
@@ -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=kJ68ufYTo849Zsh6_BXn-mSLse0ZHsMEP0yuzeFrTzE,32509
49
+ service_capacity_modeling/models/org/netflix/cassandra.py,sha256=mglxXmEFF_ge8_HD02mHuFp4leLEA4JF3xDAS1h7bW4,32896
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
@@ -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.54.dist-info/licenses/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
73
- service_capacity_modeling-0.3.54.dist-info/METADATA,sha256=MnEqceUIId8ws3qU2vAxDhVF6MCKBCDc74tq_c4WE54,9590
74
- service_capacity_modeling-0.3.54.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
- service_capacity_modeling-0.3.54.dist-info/entry_points.txt,sha256=ZsjzpG5SomWpT1zCE19n1uSXKH2gTI_yc33sdl0vmJg,146
76
- service_capacity_modeling-0.3.54.dist-info/top_level.txt,sha256=H8XjTCLgR3enHq5t3bIbxt9SeUkUT8HT_SDv2dgIT_A,26
77
- service_capacity_modeling-0.3.54.dist-info/RECORD,,
72
+ service_capacity_modeling-0.3.55.dist-info/licenses/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
73
+ service_capacity_modeling-0.3.55.dist-info/METADATA,sha256=E-VMoK90ERxd_OFWoijTlHR-KPdrcbM9v1SMzdSaUDM,9590
74
+ service_capacity_modeling-0.3.55.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
+ service_capacity_modeling-0.3.55.dist-info/entry_points.txt,sha256=ZsjzpG5SomWpT1zCE19n1uSXKH2gTI_yc33sdl0vmJg,146
76
+ service_capacity_modeling-0.3.55.dist-info/top_level.txt,sha256=H8XjTCLgR3enHq5t3bIbxt9SeUkUT8HT_SDv2dgIT_A,26
77
+ service_capacity_modeling-0.3.55.dist-info/RECORD,,