Improve reliability of fragmentation tests
This commit is contained in:
parent
5afdab4e1f
commit
ef537cc4d3
@ -49,10 +49,13 @@ start_server {tags {"defrag"} overrides {appendonly yes auto-aof-rewrite-percent
|
|||||||
r config set maxmemory 100mb
|
r config set maxmemory 100mb
|
||||||
r config set maxmemory-policy allkeys-lru
|
r config set maxmemory-policy allkeys-lru
|
||||||
|
|
||||||
|
for {set i 0} {$i < 10} {incr i} {
|
||||||
populate 700000 asdf1 150
|
populate 700000 asdf1 150
|
||||||
populate 170000 asdf2 300
|
populate 170000 asdf2 300
|
||||||
after 120 ;# serverCron only updates the info once in 100ms
|
after 120 ;# serverCron only updates the info once in 100ms
|
||||||
set frag [s allocator_frag_ratio]
|
set frag [s allocator_frag_ratio]
|
||||||
|
if {$frag >= 1.4} {break}
|
||||||
|
}
|
||||||
if {$::verbose} {
|
if {$::verbose} {
|
||||||
puts "frag $frag"
|
puts "frag $frag"
|
||||||
}
|
}
|
||||||
@ -507,11 +510,14 @@ start_server {tags {"defrag"} overrides {server-threads 1 active-replica yes} }
|
|||||||
r config set active-defrag-ignore-bytes 2mb
|
r config set active-defrag-ignore-bytes 2mb
|
||||||
r config set maxmemory 100mb
|
r config set maxmemory 100mb
|
||||||
r config set maxmemory-policy allkeys-lru
|
r config set maxmemory-policy allkeys-lru
|
||||||
|
for {set i 0} {$i < 10} {incr i} {
|
||||||
populate 700000 asdf1 150
|
populate 700000 asdf1 150
|
||||||
populate 170000 asdf2 300
|
populate 170000 asdf2 300
|
||||||
r ping ;# trigger eviction following the previous population
|
r ping ;# trigger eviction following the previous population
|
||||||
after 120 ;# serverCron only updates the info once in 100ms
|
after 120 ;# serverCron only updates the info once in 100ms
|
||||||
set frag [s allocator_frag_ratio]
|
set frag [s allocator_frag_ratio]
|
||||||
|
if {$frag >= 1.4} {break}
|
||||||
|
}
|
||||||
if {$::verbose} {
|
if {$::verbose} {
|
||||||
puts "frag $frag"
|
puts "frag $frag"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user