Skip to content

Commit

Permalink
azure pipelines: Clear periodically page cache
Browse files Browse the repository at this point in the history
Applications read /sys/fs/cgroup/memory/memory.{usage_in_bytes,limit_in_bytes}
in cgroupv1 to calculate an available memory as limit_in_bytes -
usage_in_bytes. But usage_in_bytes is the sum of rss and page cache.
So, on production systems the page cache always takes significant
amount of memory.
  • Loading branch information
stanislavlevin committed Jan 26, 2024
1 parent 731aaba commit 2e284c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ipatests/azure/templates/run-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ steps:
}
export -f runner
# clear page cache to make application think the system has more memory
# /sys/fs/cgroup/memory/memory.usage_in_bytes = rss + page cache
while : ; do
sleep 1m
sudo /bin/bash -c 'sync; echo 1 > /proc/sys/vm/drop_caches'
done &
result=1
rm -f result_*
{ parallel \
Expand Down

0 comments on commit 2e284c9

Please sign in to comment.