_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
-# Set ULIMIT_NOFILE to min(file-max, 50000 files per LOAD_FACTOR)
+# Set ULIMIT_NOFILE to min(file-max / 2, 50000 files per LOAD_FACTOR)
# so that this test doesn't take forever or OOM the box
max_files=$((50000 * LOAD_FACTOR))
-max_allowable_files=$(( $(cat /proc/sys/fs/file-max) ))
+max_allowable_files=$(( $(cat /proc/sys/fs/file-max) / 2 ))
test $max_allowable_files -gt 0 && test $max_files -gt $max_allowable_files && \
max_files=$max_allowable_files
ulimit -n $max_files
# Try to load up all the CPUs, two threads per CPU.
nr_cpus=$(( $(getconf _NPROCESSORS_ONLN) * 2 ))
-# Set ULIMIT_NOFILE to min(file-max, 50000 files per LOAD_FACTOR)
+# Set ULIMIT_NOFILE to min(file-max / 2, 50000 files per LOAD_FACTOR)
# so that this test doesn't take forever or OOM the box
max_files=$((50000 * LOAD_FACTOR))
-max_allowable_files=$(( $(cat /proc/sys/fs/file-max) ))
+max_allowable_files=$(( $(cat /proc/sys/fs/file-max) / 2 ))
test $max_allowable_files -gt 0 && test $max_files -gt $max_allowable_files && \
max_files=$max_allowable_files
ulimit -n $max_files
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount
-# Set ULIMIT_NOFILE to min(file-max, 30000 files per LOAD_FACTOR)
+# Set ULIMIT_NOFILE to min(file-max / 2, 30000 files per LOAD_FACTOR)
# so that this test doesn't take forever or OOM the box
max_files=$((30000 * LOAD_FACTOR))
-max_allowable_files=$(( $(cat /proc/sys/fs/file-max) ))
+max_allowable_files=$(( $(cat /proc/sys/fs/file-max) / 2 ))
test $max_allowable_files -gt 0 && test $max_files -gt $max_allowable_files && \
max_files=$max_allowable_files
ulimit -n $max_files
# Load up all the CPUs, two threads per CPU.
nr_cpus=$(( $(getconf _NPROCESSORS_ONLN) * 2 ))
-# Set ULIMIT_NOFILE to min(file-max, 30000 files per cpu per LOAD_FACTOR)
+# Set ULIMIT_NOFILE to min(file-max / 2, 30000 files per cpu per LOAD_FACTOR)
# so that this test doesn't take forever or OOM the box
max_files=$((30000 * LOAD_FACTOR))
-max_allowable_files=$(( $(cat /proc/sys/fs/file-max) ))
+max_allowable_files=$(( $(cat /proc/sys/fs/file-max) / 2 ))
test $max_allowable_files -gt 0 && test $max_files -gt $max_allowable_files && \
max_files=$max_allowable_files
ulimit -n $max_files