blob: efa3a90b6d65615d55be524fc7bfed2581245e66 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh
# step 1) fill $mem with $nr_task files
# step 2) truncate the files sequentially
. ./hw_vars
t0=$(date +%s.%N)
for i in `seq $nr_task`
do
create_sparse_file $SPARSE_FILE-$i $((mem / nr_task))
cat $SPARSE_FILE-$i > /dev/null
done
t1=$(date +%s.%N)
echo $mem bytes faulted in $t1-$t0 seconds
t0=$(date +%s.%N)
rm $SPARSE_FILE-*
t1=$(date +%s.%N)
echo $mem bytes truncated in $t1-$t0 seconds
|