#!/bin/bash # Dropping caches... # Killing other vmtouch instances... # Evicting vmtouch pages... # Evicting /usr/lib/gcc/x86_64-linux-gnu/12/cc1 # # Files: 1 # Directories: 0 # Evicted Pages: 8142 (31M) # Elapsed: 9.3e-05 seconds # Running test: # Run time: .862693115 # # Loading into memory with vmtouch... # Sleeping 5 seconds to make sure it is loaded completely... # /usr/lib/gcc/x86_64-linux-gnu/12/cc1 # [OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO] 8142/8142 # LOCKED 8142 pages (31M) # Running test: # Run time: .032221643 echo "Dropping caches..." echo 1 > /proc/sys/vm/drop_caches echo "Killing other vmtouch instances..." pkill -f vmtouch echo "Evicting vmtouch pages..." vmtouch -ve /usr/lib/gcc/x86_64-linux-gnu/12/cc1 echo "Running test:" start=`date +%s.%N` /usr/lib/gcc/x86_64-linux-gnu/12/cc1 --help 2>&1 > /dev/null end=`date +%s.%N` runt=$( echo "$end - $start" | bc -l ) echo "Run time: $runt" echo echo "Loading into memory with vmtouch..." vmtouch -vl /usr/lib/gcc/x86_64-linux-gnu/12/cc1 & echo "Sleeping 5 seconds to make sure it is loaded completely..." sleep 5 echo "Running test:" start=`date +%s.%N` /usr/lib/gcc/x86_64-linux-gnu/12/cc1 --help 2>&1 > /dev/null end=`date +%s.%N` runt=$( echo "$end - $start" | bc -l ) echo "Run time: $runt"