Skip to content

Commit

Permalink
Compact memory after dropping caches
Browse files Browse the repository at this point in the history
With this commit we request memory compaction after dropping caches in
order to avoid increasing memory fragmentation when running multiple
benchmarks.

Relates elastic#64
  • Loading branch information
danielmitterdorfer authored May 14, 2018
1 parent 62294f9 commit 961ea09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fixtures/ansible/roles/drop-caches/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@
- name: Free slab objects and pagecache
command: echo 3 > /proc/sys/vm/drop_caches
become: true

# also request compaction to reduce memory fragmentation
- name: Request memory compaction
command: echo 1 > /proc/sys/vm/compact_memory
become: true

0 comments on commit 961ea09

Please sign in to comment.