From 961ea09fbfee7c80b57998056efa70d69053528f Mon Sep 17 00:00:00 2001 From: Daniel Mitterdorfer Date: Mon, 14 May 2018 09:59:58 +0200 Subject: [PATCH] Compact memory after dropping caches With this commit we request memory compaction after dropping caches in order to avoid increasing memory fragmentation when running multiple benchmarks. Relates #64 --- fixtures/ansible/roles/drop-caches/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fixtures/ansible/roles/drop-caches/tasks/main.yml b/fixtures/ansible/roles/drop-caches/tasks/main.yml index 33bd78dfae3c9..067ffcd60c8c0 100644 --- a/fixtures/ansible/roles/drop-caches/tasks/main.yml +++ b/fixtures/ansible/roles/drop-caches/tasks/main.yml @@ -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