(Mon, 26 Mar 09:50) Warren Young: > > I compared page generation speed with some other Fossil repositories: > > Fossil itself, SQLite, Tcl > > using the same pages which are not strictly related to > > repository size and age: like > > /help, /sitemap, /stat, /wiki, /version?verbose > > > > and on these repos I got various timings after refreshing page, > > while on mine always 0.001s > > You are presumably using a new or at least young repository, thus the various > log(N) operations are using very small values of N, thus take very few CPU > cycles to execute. Additionally, you are doing this on a system that is not > under load, and which has hot RAM and mass storage caches. > > To this, you are comparing other repositories with large N, which probably > have other concurrent users at any given time, and which are likely to have > quite a few cache misses. > > Naturally your repository is “faster”. Put it under the same loads, and it > will slow down as well.
OK, thanks for the detailed answer. But why I still got better timings even under heavy load? I have added a temporary Fossil mirror, then run stress.sh. (VPS bursted: all RAM, Swap and CPU were used, so I added after that a rate limiting to nginx.) Here are results of r.sh when stress.sh was run (and all RAM was used on VPS): 2018-03-26-19:34:08 time generation: 0.001s; load average: 10.909180 2018-03-26-19:34:11 time generation: 0.001s; load average: 10.909180 2018-03-26-19:34:14 time generation: 0.001s; load average: 12.918450 2018-03-26-19:34:15 time generation: 0.001s; load average: 12.918450 2018-03-26-19:34:18 time generation: 0.001s; load average: 14.767090 2018-03-26-19:34:22 time generation: 0.001s; load average: 14.767090 2018-03-26-19:34:24 time generation: 0.001s; load average: 16.547850 and against fossil-scm.org itself (only r.sh): 2018-03-26-20:01:03 time generation: 0.003s; load average: 0.110000 2018-03-26-20:01:07 time generation: 0.004s; load average: 0.100000 2018-03-26-20:01:13 time generation: 0.003s; load average: 0.090000 2018-03-26-20:01:20 time generation: 0.003s; load average: 0.080000 2018-03-26-20:01:26 time generation: 0.003s; load average: 0.070000 2018-03-26-20:01:29 time generation: 0.003s; load average: 0.070000 2018-03-26-20:01:32 time generation: 0.003s; load average: 0.060000 I tested only /wiki page. -- https://www.juef.space/
#!/bin/sh url="https://www.fossil-scm.org/index.html/wiki" test_env_url="https://www.fossil-scm.org/index.html/test_env" url="https://f.juef.space/mirrors/fossil/wiki" test_env_url="https://f.juef.space/mirrors/fossil/test_env" while true; do t="$(curl -s "$url" \ | awk '/This page was generated/ { getline; print($1) }')" la="$(curl -s "$test_env_url" \ | awk '/load_average()/ { print(substr($3, 0, 8)) }')" printf "%s time generation: %s; load average: %f\n" \ "$(date -u '+%F-%T')" "$t" "$la" done
#!/bin/sh url="https://f.juef.space/mirrors/fossil/vdiff?from=694e11a72e32bb45&to=1336c4af8a016772" while true; do ab -c 50 -n 50 "$url" > /dev/null done
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users