AGFS 文件系统性能测试
· ☕ 3 分钟
1. 安装 wrk 1 apt-get install -y wrk 2. localfs 性能测试 2.1 1KB 小文件测试 写文件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 cat > put-1k.lua <<"EOF" wrk.method = "PUT" wrk.body = string.rep("a", 1024) wrk.headers["Content-Type"] = "text/plain" counter = 0 local WRAP = 500000 request = function() counter = counter + 1 local n = ((counter - 1) % WRAP) + 1 local filename = "/local/perf-1k/test_" .. n .. ".txt" local path = "/api/v1/files?path=" .. filename return wrk.format(nil, path) end EOF 1 curl -X POST "http://127.0.0.1:8080/api/v1/directories?path=/local/perf-1k" 1 wrk -t4 -c40 -d30s -s put-1k.lua "http://127.0.0.1:8080" 1 2 3 4 5 6 7 8 Running 30s