Stablize page reclaim CI test (#11818)

stabilize the test introduced in #11248
* remove random aspect of the test by using DEBUG POPULATE instead of redis-benchmark
* disable rdbcompression, so that the rdb file is always about 1GB.

when fadvise was disabled, i get about 1GB in the page cace
when enabled i get less than 200KB
so for now, i'll keep the 500kb threshold.
This commit is contained in:
Oran Agra 2023-02-19 18:38:07 +02:00 committed by GitHub
parent 521e54f551
commit 3ac835777c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -316,15 +316,17 @@ jobs:
run: |
echo "test SAVE doesn't increase cache"
CACHE0=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}')
./src/redis-server --daemonize yes --logfile /dev/null --dir /tmp/master --port 8080 --repl-diskless-sync no --pidfile /tmp/master/redis.pid
./src/redis-server --daemonize yes --logfile /dev/null --dir /tmp/slave --port 8081 --repl-diskless-load disabled
./src/redis-benchmark -p 8080 -d 102400 -t set -r 100000 -n 10000 > /dev/null
echo "$CACHE0"
./src/redis-server --daemonize yes --logfile /dev/null --dir /tmp/master --port 8080 --repl-diskless-sync no --pidfile /tmp/master/redis.pid --rdbcompression no --enable-debug-command yes
./src/redis-cli -p 8080 debug populate 10000 k 102400
./src/redis-server --daemonize yes --logfile /dev/null --dir /tmp/slave --port 8081 --repl-diskless-load disabled --rdbcompression no
./src/redis-cli -p 8080 save > /dev/null
VMOUT=$(vmtouch -v /tmp/master/dump.rdb)
echo $VMOUT
grep -q "0%" <<< $VMOUT
CACHE=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}')
if [ "$(( $CACHE-$CACHE0 ))" -gt "500000" ]; then echo "$CACHE0 $CACHE"; exit 1; fi
echo "$CACHE"
if [ "$(( $CACHE-$CACHE0 ))" -gt "500000" ]; then exit 1; fi
echo "test replication doesn't increase cache"
./src/redis-cli -p 8081 REPLICAOF 127.0.0.1 8080 > /dev/null
@ -337,7 +339,8 @@ jobs:
echo $VMOUT
grep -q "0%" <<< $VMOUT
CACHE=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}')
if [ "$(( $CACHE-$CACHE0 ))" -gt "500000" ]; then echo "$CACHE0 $CACHE"; exit 1; fi
echo "$CACHE"
if [ "$(( $CACHE-$CACHE0 ))" -gt "500000" ]; then exit 1; fi
echo "test reboot doesn't increase cache"
PID=$(cat /tmp/master/redis.pid)
@ -350,7 +353,8 @@ jobs:
echo $VMOUT
grep -q "0%" <<< $VMOUT
CACHE=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}')
if [ "$(( $CACHE-$CACHE0 ))" -gt "500000" ]; then echo "$CACHE0 $CACHE"; exit 1; fi
echo "$CACHE"
if [ "$(( $CACHE-$CACHE0 ))" -gt "500000" ]; then exit 1; fi
test-valgrind-test:
runs-on: ubuntu-latest