@@ -186,6 +186,7 @@ async def test_eval_with_oom(df_factory: DflyInstanceFactory):
186
186
187
187
188
188
@pytest .mark .asyncio
189
+ @pytest .mark .parametrize ("repeat" , range (4 ))
189
190
@pytest .mark .parametrize (
190
191
"proactor_threads_param, maxmemory_param" ,
191
192
[(1 , 6 * (1024 ** 3 )), (4 , 6 * (1024 ** 3 ))],
@@ -194,6 +195,7 @@ async def test_cache_eviction_with_rss_deny_oom_simple_case(
194
195
df_factory : DflyInstanceFactory ,
195
196
proactor_threads_param ,
196
197
maxmemory_param ,
198
+ repeat ,
197
199
):
198
200
"""
199
201
Test to verify that cache eviction is triggered even if used memory is small but rss memory is above limit
@@ -287,12 +289,13 @@ async def test_cache_eviction_with_rss_deny_oom_simple_case(
287
289
288
290
289
291
@pytest .mark .asyncio
292
+ @pytest .mark .parametrize ("repeat" , range (4 ))
290
293
@pytest .mark .parametrize (
291
294
"proactor_threads_param, maxmemory_param" ,
292
295
[(1 , 6 * (1024 ** 3 )), (4 , 6 * (1024 ** 3 ))],
293
296
)
294
297
async def test_cache_eviction_with_rss_deny_oom_two_waves (
295
- df_factory : DflyInstanceFactory , proactor_threads_param , maxmemory_param
298
+ df_factory : DflyInstanceFactory , proactor_threads_param , maxmemory_param , repeat
296
299
):
297
300
"""
298
301
Test to verify that cache eviction is triggered even if used memory is small but rss memory is above limit
@@ -319,10 +322,10 @@ async def test_cache_eviction_with_rss_deny_oom_two_waves(
319
322
rss_eviction_threshold = max_memory * (rss_oom_deny_ratio - eviction_memory_budget_threshold )
320
323
321
324
# first wave fills 85% of max memory
322
- # second wave fills 20 % of max memory
325
+ # second wave fills 25 % of max memory
323
326
data_fill_size = [
324
327
int ((rss_oom_deny_ratio + 0.05 ) * max_memory ),
325
- int ((1 - rss_oom_deny_ratio ) * max_memory ),
328
+ int ((1 - rss_oom_deny_ratio + 0.05 ) * max_memory ),
326
329
]
327
330
328
331
val_size = 1024 * 5 # 5 kb
@@ -372,7 +375,7 @@ async def test_cache_eviction_with_rss_deny_oom_two_waves(
372
375
break
373
376
374
377
# Wait for some time
375
- await asyncio .sleep (6 )
378
+ await asyncio .sleep (3 )
376
379
377
380
memory_arena = await async_client .execute_command ("MEMORY" , "ARENA" )
378
381
fragmentation_waste = extract_fragmentation_waste (memory_arena )
0 commit comments