Commit 5f6695ad authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Use number of CPUs as thread/GOMAXPROCS count.

This tests multicore behavior.  Do not stat with more threads than
CPUs, since kernel+FUSE can never keep up with the stat threads.
parent 9d49ff98
...@@ -8,6 +8,8 @@ set -eux ...@@ -8,6 +8,8 @@ set -eux
ZIPFILE=$1 ZIPFILE=$1
shift shift
CPU_COUNT=$(ls /sys/class/cpuid/ | wc -l)
export GOMAXPROCS=${CPU_COUNT}
DELAY=5 DELAY=5
...@@ -19,7 +21,7 @@ fusermount -u ${MP} || true ...@@ -19,7 +21,7 @@ fusermount -u ${MP} || true
mkdir -p ${MP} mkdir -p ${MP}
ZIPFS=$PWD/zipfs/zipfs ZIPFS=$PWD/zipfs/zipfs
BULKSTAT=$PWD/bulkstat/bulkstat BULKSTAT="$PWD/bulkstat/bulkstat -threads ${CPU_COUNT}"
cd /tmp cd /tmp
...@@ -40,6 +42,9 @@ sleep ${DELAY} ...@@ -40,6 +42,9 @@ sleep ${DELAY}
# Warm caches. # Warm caches.
${BULKSTAT} -runs 1 /tmp/zipfiles.txt ${BULKSTAT} -runs 1 /tmp/zipfiles.txt
# Wait for dentry cache to expire.
sleep 2
# Performance number without 6prof running # Performance number without 6prof running
echo -e "\n\n" echo -e "\n\n"
${BULKSTAT} -runs 5 /tmp/zipfiles.txt ${BULKSTAT} -runs 5 /tmp/zipfiles.txt
...@@ -64,6 +69,9 @@ sleep ${DELAY} ...@@ -64,6 +69,9 @@ sleep ${DELAY}
# Warm caches. # Warm caches.
${BULKSTAT} -runs 1 /tmp/zipfiles.txt ${BULKSTAT} -runs 1 /tmp/zipfiles.txt
# Expire dentry cache.
sleep 2
# Measurements. # Measurements.
${BULKSTAT} -runs 5 /tmp/zipfiles.txt ${BULKSTAT} -runs 5 /tmp/zipfiles.txt
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment