Skip to content

Commit f07818b

Browse files
Add fixture to drop page cache and SLAB objects
Closes elastic#30
1 parent b12d827 commit f07818b

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Drops the page cache and SLAB objects as documented in https://www.kernel.org/doc/Documentation/sysctl/vm.txt.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
- name: Run sync to minimize the number of dirty objects on the system
3+
command: /bin/sync
4+
become: true
5+
6+
# Give sync a little bit of time to finish. For rationale see notes in https://linux.die.net/man/8/sync.
7+
- pause:
8+
seconds: 3
9+
10+
- name: Free slab objects and pagecache
11+
command: echo 3 > /proc/sys/vm/drop_caches
12+
become: true

night_rally.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ NIGHT_RALLY_HOME="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
2929
# Night Rally is *always* the master for assets
3030
ASSET_SOURCE="${NIGHT_RALLY_HOME}/external/pages/*"
3131

32-
ANSIBLE_ALL_TAGS=(encryption-at-rest initialize-data-disk trim)
32+
ANSIBLE_ALL_TAGS=(encryption-at-rest initialize-data-disk trim drop-caches)
3333
ANSIBLE_SKIP_TAGS=( )
3434
ANSIBLE_SKIP_TAGS_STRING=""
3535
SELF_UPDATE=NO

0 commit comments

Comments
 (0)