Comment 14 for bug 1236619

Revision history for this message
Jean-Pierre van Riel (jpvr) wrote :

Hi, to report, also noticed gvfs smb mount being over 10x slower in many cases depending on the read IO pattern. Seems GVFS alls a lot of latency. Summary of benchmark via fio:

GVFS SMB:
=========

name type size block_size latency_(ms) bandwidth_(kb) IOPS
---- ---- ---- ---------- ------------ -------------- ----
4k_4k_seq_read read 4k 4k 7.597604 100 25
512k_4k_seq_read read 512k 4k 12.608847148437 312 78.001219
4m_64k_seq_read read 4m 64k 58.59852259375 1082 16.91779
8m_256k_seq_read read 8m 256k 252.2923598125 1010 3.948667
16m_1m_seq_read read 16m 1m 1079.9320893125 946 0.924481

CIFS:
=====

name type size block_size latency_(ms) bandwidth_(kb) IOPS
---- ---- ---- ---------- ------------ -------------- ----
4k_4k_seq_read read 4k 4k 7.226365 250 62.5
512k_4k_seq_read read 512k 4k 0.35290271875 9481 2370.37037
4m_64k_seq_read read 4m 64k 4.14038503125 15003 234.432234
8m_256k_seq_read read 8m 256k 17.80018796875 14148 55.267703
16m_1m_seq_read read 16m 1m 83.7329983125 12145 11.860638

Bash script to test this (depends on fio, jq and column)

#json_benchmark_result_summary=''
tempfile=$(mktemp /tmp/read_test.XXXXXXXX.ndjson)
echo "# Using temp file: $tempfile"

function seq_read_benchmark() {
  local total_size="$1"
  local block_size="$2"
  echo "# Testing sequential read of $total_size size in $block_size."
  sleep 1
  fio --name="${total_size}_${block_size}_seq_read" --filename="${total_size}_${block_size}_seq_read_test.bin" --rw=read --iodepth=1 --max-jobs=1 --size="$total_size" --bs="$block_size" --output-format=json >> "$tempfile"
  rm "${total_size}_${block_size}_seq_read_test.bin"
}

seq_read_benchmark 4k 4k # 1 block read
seq_read_benchmark 512k 4k # 128 x 4k blocks read
seq_read_benchmark 4m 64k # 64 x 64k blocks read
seq_read_benchmark 8m 256k # 32 x 128k blocks read
seq_read_benchmark 16m 1m # 16 x 1m blocks read

# Reshaping JSON with jq: https://programminghistorian.org/en/lessons/json-and-jq#output-a-csv-csv
# How to format a JSON string as a table using jq?: https://stackoverflow.com/a/39144364/5472444
jq -s -r '(["name","type","size","block_size","latency_(ms)","bandwidth_(kb)","IOPS"] | (., map(length*"-"))), (.[] | .jobs[] | [.jobname, ."job options".rw, ."job options".size, ."job options".bs, (.read.lat_ns.mean/1000000), .read.bw, .read.iops]) | @tsv' "$tempfile" | column -t

# Convert JSON lines to JSON array using jq: https://stackoverflow.com/a/61867230/5472444
#jq -s '[.[] | .jobs[] | {name: .jobname, type: ."job options".rw, size: ."job options".size, "block size": ."job options".bs, "latency (ms)": (.read.lat_ns.mean/1000000), "bandwidth (kb)": .read.bw, IOPS: .read.iops}]' "$tempfile" > read_test_summary.json

# Cleanup
rm "$tempfile"