Skip to content

fulmine, fulmine-tuned: serve static bodies from the framework's file cache - #1279

Open
nigrosimone wants to merge 2 commits into
MDA2AV:mainfrom
nigrosimone:fulmine-static-cache
Open

fulmine, fulmine-tuned: serve static bodies from the framework's file cache#1279
nigrosimone wants to merge 2 commits into
MDA2AV:mainfrom
nigrosimone:fulmine-static-cache

Conversation

@nigrosimone

@nigrosimone nigrosimone commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

The static rules changed in #1267: an entry may serve file contents out of memory as long as the cache is the framework's own and follows the disk. Both entries turned fulmine's small-file cache off to satisfy the old rule, so this turns it back on, which is where the framework has it by default.

It follows the disk by construction: a hit requires the cached mtime and size to match the stat the request already paid for, so a file that was replaced is read again. Checked against the validator's own staleness probe locally, on the entries' exact static configuration: the next response after the replacement carries the new bytes, at zero seconds rather than inside the window.

fulmine-tuned also loses stat cache: 24h. A body cache validated against a remembered stat cannot see a file replaced inside that window, and the two together fail the probe where the body cache alone passes. That entry is now tuned by its Postgres driver and its connection headers, and its static route is the standard one.

Worth about 15% on a static route locally, with the file read gone.

Ref #1280

@nigrosimone
nigrosimone marked this pull request as ready for review August 23, 2026 05:07
@nigrosimone

Copy link
Copy Markdown
Contributor Author

/benchmark-multiple -f fulmine,fulmine-tuned --save

@github-actions

Copy link
Copy Markdown
Contributor

👋 Benchmark request received. A collaborator will review and approve the run.

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results

Frameworks: 2 | Test: all tests

fulmine

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 1,381,692 6787.9% 2.7GiB +2.5% ~0%
baseline 4096 1,358,039 6792.0% 2.7GiB +1.3% ~0%
pipelined 512 32,052,867 6771.7% 2.1GiB +1.5% ~0%
pipelined 4096 32,171,059 6434.8% 2.1GiB +2.5% ~0%
limited-conn 512 1,131,108 6165.0% 2.7GiB +0.6% ~0%
limited-conn 4096 1,218,595 6454.3% 2.8GiB +0.3% ~0%
json 4096 1,120,941 6459.4% 6.9GiB -0.3% ~0%
json-comp 512 456,636 6173.2% 7.2GiB -0.8% -1.4%
json-comp 4096 478,391 6393.5% 7.5GiB -0.3% -1.3%
json-comp 16384 491,650 6286.4% 8.5GiB -1.2% ~0%
json-tls 4096 1,047,333 6457.2% 6.9GiB -0.8% +3.0%
upload 32 2,040 2927.9% 6.6GiB +0.5% -2.9%
upload 256 2,159 6024.0% 7.1GiB -0.2% -2.7%
api-4 256 36,572 393.6% 532MiB -0.2% -1.3%
api-16 1024 128,338 1560.4% 2.2GiB +1.3% ~0%
static 1024 761,161 6645.9% 3.3GiB +99.0% -46.8%
static 4096 754,396 6610.4% 4.2GiB +49.1% -44.7%
static 6800 726,639 6472.7% 6.0GiB +29.6% -22.1%
static-tls 1024 602,299 6575.9% 3.5GiB +85.0% -44.4%
static-tls 4096 573,542 6548.4% 4.2GiB +39.4% -40.0%
static-tls 6800 546,998 6529.6% 4.3GiB +24.5% -41.1%
async-db 1024 227,282 6002.4% 3.7GiB -2.4% -14.0%
crud 4096 355,736 4322.6% 8.2GiB -0.9% -2.4%
fortunes 1024 68,094 6490.3% 4.2GiB -0.5% -2.3%
gateway-64 512 90,890 4105.3% 5.8GiB -0.6% +7.4%
gateway-64 1024 83,832 4018.7% 7.5GiB +2.6% -1.3%
gateway-h3 64 90,388 3284.4% 3.5GiB ~0% +2.9%
gateway-h3 256 62,270 2420.7% 4.6GiB -0.8% +2.2%
production-stack 256 58,965 4288.8% 3.0GiB -0.4% -6.3%
production-stack 1024 45,387 4183.3% 4.5GiB -5.5% +9.8%
echo-ws 512 3,772,578 6464.2% 2.3GiB ~0% ~0%
echo-ws 4096 3,818,160 6331.8% 2.4GiB -0.5% ~0%
echo-ws 16384 3,604,920 6501.8% 2.5GiB +0.1% ~0%
echo-ws-pipeline 512 24,834,944 6802.1% 2.4GiB -0.6% ~0%
echo-ws-pipeline 4096 24,909,190 6591.6% 2.4GiB -0.8% ~0%
echo-ws-pipeline 16384 23,868,796 6371.5% 2.6GiB -0.6% ~0%
echo-ws-limited 512 2,088,249 5518.1% 2.4GiB ~0% ~0%
echo-ws-limited 4096 2,563,658 6242.7% 2.4GiB -0.6% ~0%

fulmine-tuned

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 1,326,113 6689.8% 2.7GiB -1.7% ~0%
baseline 4096 1,327,667 6594.1% 2.7GiB -0.9% ~0%
pipelined 512 33,165,619 6657.9% 2.1GiB ~0% ~0%
pipelined 4096 33,132,732 6725.7% 2.1GiB -1.6% ~0%
limited-conn 512 1,128,040 6151.5% 2.7GiB -1.0% ~0%
limited-conn 4096 1,225,165 6436.9% 2.8GiB -0.7% ~0%
json 4096 1,134,438 6435.9% 6.8GiB -0.5% -17.1%
json-comp 512 457,727 6186.7% 7.2GiB -0.7% -1.4%
json-comp 4096 478,742 6453.5% 7.4GiB -0.5% -2.6%
json-comp 16384 497,631 6359.1% 8.5GiB +0.3% -1.2%
json-tls 4096 1,062,999 6582.2% 8.2GiB -0.8% +20.6%
upload 32 2,041 3066.4% 6.7GiB -0.3% ~0%
upload 256 2,156 6312.3% 7.1GiB ~0% ~0%
api-4 256 36,504 396.0% 529MiB -0.3% -2.9%
api-16 1024 124,467 1528.2% 2.2GiB -2.2% ~0%
static 1024 764,750 6644.7% 3.3GiB +79.5% -47.6%
static 4096 758,972 6613.0% 4.3GiB +31.6% -40.3%
static 6800 731,806 6543.2% 6.0GiB +13.1% -24.1%
static-tls 1024 606,205 6593.7% 3.3GiB +69.1% -46.8%
static-tls 4096 578,877 6414.4% 4.2GiB +24.1% -39.1%
static-tls 6800 553,334 6527.7% 4.3GiB +10.6% -40.3%
async-db 1024 247,582 6028.3% 6.2GiB -0.4% ~0%
crud 4096 379,393 3750.0% 8.2GiB +1.1% -2.4%
fortunes 1024 70,338 6486.6% 6.5GiB -0.2% ~0%
gateway-64 512 91,237 4121.5% 5.6GiB -0.2% ~0%
gateway-64 1024 83,056 4035.7% 7.5GiB -1.0% +7.1%
gateway-h3 64 90,338 3372.4% 3.5GiB -0.2% +2.9%
gateway-h3 256 62,929 2419.1% 4.7GiB +3.5% +2.2%
production-stack 256 59,149 4213.0% 3.0GiB -0.1% -9.1%
production-stack 1024 46,738 4049.3% 5.1GiB -2.1% ~0%
echo-ws 512 3,782,419 6522.6% 2.3GiB +0.5% ~0%
echo-ws 4096 3,841,222 6332.4% 2.4GiB +0.4% ~0%
echo-ws 16384 3,610,837 6245.6% 2.5GiB +0.1% ~0%
echo-ws-pipeline 512 24,907,772 6801.2% 2.4GiB -1.0% ~0%
echo-ws-pipeline 4096 25,054,745 6609.5% 2.4GiB ~0% ~0%
echo-ws-pipeline 16384 23,839,324 6372.5% 2.6GiB ~0% ~0%
echo-ws-limited 512 2,081,943 5507.5% 2.4GiB -1.2% ~0%
echo-ws-limited 4096 2,573,119 6250.3% 2.4GiB -0.4% ~0%

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