summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2026-03-08 18:44:41 +0800
committerSadeep Madurange <sadeep@asciimx.com>2026-03-09 12:51:30 +0800
commitb9f969385c11ee0d1c96f8f2595f44b1d79e463b (patch)
tree7d38d36840cd32aa670cb65290206cab6fc585c2
parentd56b5b81a8c7247e076a85d9aa5cf28b427a73b9 (diff)
downloadwww-b9f969385c11ee0d1c96f8f2595f44b1d79e463b.tar.gz
Add mmap details to site search.
-rw-r--r--_log/site-search.md11
1 files changed, 6 insertions, 5 deletions
diff --git a/_log/site-search.md b/_log/site-search.md
index e9137de..20c66de 100644
--- a/_log/site-search.md
+++ b/_log/site-search.md
@@ -60,8 +60,6 @@ read($fh_cp, my $text, $query_len);
Small seek/reads are fast on modern SSDs; keeps memory footprint small.
-NOTE: mmap.
-
Benchmarks on T490 (i7-10510U, OpenBSD 7.8, article size: 16 KB) against linear
regex search:
@@ -89,6 +87,10 @@ regex search:
- Search (SA): 0.0161 s
- Search (Regex): 0.9120 s
+Seek/read consistently outperformed mmap at <1k files. At 10k, mmap was
+occasionally faster (~200 µs), but used more memory—possibly OpenBSD's VM
+security trade-offs. Results may vary by OS.
+
Security: httpd, slowcgi, Perl in OpenBSD base system. File system permissions
govern access. Runs in chroot.
@@ -96,9 +98,8 @@ Resource exhaustion and XSS attacks are inherent. Lock-file semaphores limit
concurrent searches. Query length (64B) and result set (20) are capped. All
output is HTML-escaped to prevent XSS.
-Warranty: 10,000 / 12 → 833 years.
-
-Next: inverted index, release date: Anno Domini 2859.
+Warranty: 10,000 / 12 → 833 years. <br>
+Next release: inverted index—Anno Domini 2859.
Commit: <a
href="https://git.asciimx.com/www/commit/?h=term&id=6da102d6e0494a3eac3f05fa3b2cdcc25ba2754e"