Skip to content

Add a benchmarks page measured on 2026-10-12 with the suite that produces it, and label the 2019 pages as the old benchmarks - #26

Merged
avgvi merged 2 commits into
masterfrom
docs/benchmark-page
Oct 18, 2026
Merged

avgvi merged 2 commits into
masterfrom
docs/benchmark-page

Conversation

@avgvi

@avgvi avgvi commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Adds a current benchmarks page and keeps the 2019 pages as the old benchmarks. The existing pages were measured by upstream for DiskCache 4 in 2019; the new one was measured on 2026-10-12 with current versions of every store.

  • docs/benchmarks.rst and four charts in docs/_static/benchmarks/: the classic mix of the old page (gets, sets, deletes, throughput, footprint), four value sizes from 100 bytes to 1 MB, 95 % and 50 % hit ratios, 4 and 8 processes and 8 threads, and the Django cache backends. Stores: diskcache-community Cache and FanoutCache(8), diskcache 5.6.3, memcached through pymemcache and pylibmc, Redis, lmdb, sqlitedict and shelve.
  • A computed table of diskcache-community against diskcache 5.6.3 near the top: reads are unchanged (classic get p50 2.6 µs in both), sets are 9 to 14 % faster (48 % at 1 MB), 8-thread throughput is 8 % higher, and the Django backend is within 3 %.
  • The page opens with a short summary computed from the results by report.py: DiskCache has the fastest read in the classic mix (2.6 µs, 6 times memcached and 16 times Redis), lmdb reads faster on a 100,000-key working set, writes are on par with memcached, the fork writes 9 to 14 % faster than 5.6.3, FanoutCache(8) is the fastest setup across 8 processes while 8 threads in one process should share a single Cache, and lmdb's writes take about 6 ms because it flushes on every write. The environment list names the server and store versions.
  • tests/benchmarks/: the suite that produced the page. driver.py starts memcached and Redis and runs each store in its own process, from one environment with diskcache-community and one with diskcache 5.6.3; report.py writes the page and charts from the JSON results. The stores import diskcache_community when installed and upstream diskcache otherwise, so the same code measures both. report.py now takes the measurement date from the results and builds the comparison table. pytest ignores the directory.
  • The two old pages are retitled "Old Cache Benchmarks (2019)" and "Old DjangoCache Benchmarks (2019)" with a note pointing to the new page; the new page links back to them. The docs index lists the new page first, comparisons.rst and development.rst point to it, and development.rst describes both sets of scripts.
  • README: a Benchmarks link in the header row, a feature line with the headline numbers, and the documentation list links the new page and the old ones, labelled as old.

Verified: the page and charts regenerate from the saved results of the 2026-10-12 run with no difference; a smoke run of the suite against diskcache-community, diskcache 5.6.3 and the Django backend works; 518 tests pass; blue, isort, flake8, doc8 and the Sphinx build with warnings as errors pass.

…uces it, and label the 2019 pages as the old benchmarks.
@read-the-docs-community

read-the-docs-community Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 diskcache-community | 🛠️ Build #35226942 | 📁 Comparing 9eccc79 against latest (383c40d)

  🔍 Preview build  

6 files changed · + 1 added · ± 5 modified

+ Added

± Modified

… method notes, and keep only the store versions in the environment list.
@avgvi
avgvi merged commit 19876af into master Oct 18, 2026
23 checks passed
@avgvi
avgvi deleted the docs/benchmark-page branch October 18, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant