René's URL Explorer Experiment


Title: id(world): many_worlds p99 is blocking fdatasync on Tokio workers, capped at ~1.5k commits/s (not algorithmic) · Issue #5502 · developing-today/code · GitHub

Open Graph Title: id(world): many_worlds p99 is blocking fdatasync on Tokio workers, capped at ~1.5k commits/s (not algorithmic) · Issue #5502 · developing-today/code

X Title: id(world): many_worlds p99 is blocking fdatasync on Tokio workers, capped at ~1.5k commits/s (not algorithmic) · Issue #5502 · developing-today/code

Description: What The F11.8 `many_worlds` reference measurement (`benches/BASELINES.md`, #557) misses its p99 target: 5,650.8 ms vs 50 ms, with completed throughput 1,523.1/s against 2,000/s scheduled. The cause is not an algorithmic O(n) problem in ...

Open Graph Description: What The F11.8 `many_worlds` reference measurement (`benches/BASELINES.md`, #557) misses its p99 target: 5,650.8 ms vs 50 ms, with completed throughput 1,523.1/s against 2,000/s scheduled. The caus...

X Description: What The F11.8 `many_worlds` reference measurement (`benches/BASELINES.md`, #557) misses its p99 target: 5,650.8 ms vs 50 ms, with completed throughput 1,523.1/s against 2,000/s scheduled. The caus...

Opengraph URL: https://github.com/developing-today/code/issues/5502

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"id(world): many_worlds p99 is blocking fdatasync on Tokio workers, capped at ~1.5k commits/s (not algorithmic)","articleBody":"## What\n\nThe F11.8 \\`many_worlds\\` reference measurement (\\`benches/BASELINES.md\\`, #557) misses its p99 target: 5,650.8 ms vs 50 ms, with completed throughput 1,523.1/s against 2,000/s scheduled. The cause is **not** an algorithmic O(n) problem in the journal. Each durable commit runs a synchronous \\`fdatasync\\` on a Tokio worker thread, so concurrent commits are capped at the worker count and the rest queue.\n\n## Evidence\n\n**Per-append path** (no O(journal) work — checked):\n\n- \\`src/world/actor.rs:444-469\\` — \\`WorldActor::persist\\` is synchronous and calls \\`journal.append\\` inline from the actor task.\n- \\`src/world_store.rs:184-204\\` — \\`FileJournal::append\\`: one \\`write_all\\`, then \\`self.file.sync_data()\\` at **:202**. No directory fsync, no re-read, no re-encode of the journal.\n- Per input: 1 fsync, 1 write, 3 full JSON encodes (\\`actor.rs:482-485\\` for replication, \\`core.rs:29-31\\` / \\`:1983-1985\\` for admin-history sizing, plus the journal line), and ~4 event clones (\\`actor.rs:1370\\`, \\`core.rs:1964,1968\\`).\n\n**Concurrency cap** (\\`benches/world_bench.rs:704-708\\`): the runtime is \\`new_multi_thread().worker_threads(available_parallelism())\\` = 16 on the reference laptop. The bench drives 100 active worlds at 20 commits/s = **2,000 fsyncs/s**. Each fsync blocks one worker, so at most 16 are ever in flight.\n\n**Micro-benchmark** (same filesystem, 64-byte appends to 100 files, \\`fdatasync\\` timed):\n\n| concurrency | fsync/s | p50 |\n|---|---|---|\n| 1 thread | 168 | 5.5 ms |\n| 16 | 1,190–1,456 | — |\n| 32 | 2,083 | — |\n| 64 | 2,648 | — |\n\nThe bench's 1,523 completed/s sits at the 16-way ceiling. Backlog ≈ (2000−1523)/1523 ≈ 3 s, which matches the p99.\n\n**Secondary (smaller, same area):**\n\n- \\`src/world/core.rs:503-506\\` — open re-serializes every journal entry with \\`serde_json::to_vec\\` just to charge the memory budget, on the async worker.\n- \\`src/world_store.rs:416-421\\` — \\`WorldCore::restore_with_runtime\\` runs on the runtime worker in \\`open_world\\`, while \\`FileJournal::open\\` is offloaded.\n- \\`src/world_hub.rs:601-622\\` — eviction shuts victims down before the requested world opens (\\`:539-541\\`), serialising leases behind the victim's in-flight command.\n\n## Proposed fix (ranked)\n\n1. **Take the fsync off the runtime worker.** Give \\`FileJournal\\` a dedicated writer thread (request channel → write + \\`fdatasync\\` → reply) so \\`WorldJournal::append\\` keeps its contract and ordering. Do not use \\`block_in_place\\`: \\`FileJournal\\` is also called from \\`spawn_blocking\\` during open. Estimated 40–50 lines. Expected to lift the cap from ~1.5k to ~2.5k fsyncs/s.\n2. **Group commit.** One flusher writes all pending per-world appends and issues one \\`syncfs(2)\\` per batch. This is the only design that reliably sustains 2,000 durable events/s under 50 ms p99 on this device. Risky (per-world error attribution, compaction ordering, replication snapshots), so it deserves its own design doc per \\`pkgs/id/AGENTS.md\\`.\n3. Move \\`restore_with_runtime\\` into the existing \\`spawn_blocking\\` in \\`open_world\\` and drop the redundant encode/clones listed above.\n\n## Acceptance\n\n- \\`cargo bench --bench world_bench\\` on the reference machine: \\`many_worlds\\` p99 \u003c 50 ms, or a recorded result with the target still missed and a reason.\n- \\`journal_append_fsync\\` baseline unchanged (5.18 ms/append) or explained.\n- Checkpoint/eviction/reopen assertions in \\`many_worlds\\` still pass.\n\nRelated: #557 (the target this measurement belongs to). Found while profiling for PR #5500 (Bolt, #5489); not addressed there.","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-11-04T14:27:17Z","url":"https://github.com/developing-today/code/issues/5502"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:eabe360c-b05d-1768-9ced-7a616ff0b2ba
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE0A6:829B4:1FED77:2C27D1:6B06F91B
html-safe-noncefb5e17164c52f84d27209cf3283b64d583e0b4e043c0d52f015c7e3e1419d51e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEE2OjgyOUI0OjFGRUQ3NzoyQzI3RDE6NkIwNkY5MUIiLCJ2aXNpdG9yX2lkIjoiMTk1NDYxNDkzNTAyODE2ODk4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacac70bd8f8d9a902223f384f40146ec6e4b3c5d7f9dabede93a2bc5f7b54afe8f
hovercard-subject-tagissue:6204724962
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/5502/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a2971530a1319ba7c2d94500d2cb2de8a4ef4233dc176a3ab1c5b31a6ddb13c0/developing-today/code/issues/5502
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a2971530a1319ba7c2d94500d2cb2de8a4ef4233dc176a3ab1c5b31a6ddb13c0/developing-today/code/issues/5502
og:image:altWhat The F11.8 `many_worlds` reference measurement (`benches/BASELINES.md`, #557) misses its p99 target: 5,650.8 ms vs 50 ms, with completed throughput 1,523.1/s against 2,000/s scheduled. The caus...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
None518c89df9981b23ef4bf1cf9e25792a20e5884aa6a2efccd817801f8bae3dd64
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3e66657d0989666cd38e3fb0fbd4e0c116e481e6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/5502#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F5502
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F5502
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/5502
Reloadhttps://github.com/developing-today/code/issues/5502
Reloadhttps://github.com/developing-today/code/issues/5502
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1.1k (1.1k)https://github.com/developing-today/code/issues
Pull requests182 (182)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/5502
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/5502
#7659https://github.com/developing-today/code/pull/7659
id(world): many_worlds p99 is blocking fdatasync on Tokio workers, capped at ~1.5k commits/s (not algorithmic)https://github.com/developing-today/code/issues/5502#top
#7659https://github.com/developing-today/code/pull/7659
https://github.com/dezren39
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 4, 2026https://github.com/developing-today/code/issues/5502#issue-6204724962
#557https://github.com/developing-today/code/issues/557
#557https://github.com/developing-today/code/issues/557
#5500https://github.com/developing-today/code/pull/5500
#5489https://github.com/developing-today/code/issues/5489
Nexthttps://github.com/developing-today/code/issues/5502?timeline_page=1
dezren39https://github.com/dezren39
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
on Nov 4, 2026https://github.com/developing-today/code/issues/5502#event-35138012385
https://github.com/apps/developing-today
developing-todayhttps://github.com/apps/developing-today
on Nov 4, 2026https://github.com/developing-today/code/issues/5502#issuecomment-6633210218
developing.todayhttps://kaneo.security.cab
CODE-1341https://kaneo.security.cab/dashboard/workspace/6oQgIkST0YGrCcxrnhbHPOUCfgdD3cqE/project/pfcq432h349r20up18gttfv4/task/psiy091o9b30wut0ywqw2h30
github-actionshttps://github.com/apps/github-actions
dezren39https://github.com/dezren39
on Nov 4, 2026https://github.com/developing-today/code/issues/5502#event-35140776631
dezren39https://github.com/dezren39
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
queue/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fparked%22
status/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fparked%22
on Nov 5, 2026https://github.com/developing-today/code/issues/5502#event-35239638671
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 5, 2026https://github.com/developing-today/code/issues/5502#issuecomment-6658010344
id(world): many_worlds p99 is blocking fdatasync on Tokio workers, capped at ~1.5k commits/s (not algorithmic) #5502https://github.com/developing-today/code/issues/5502
id(world): many_worlds p99 is blocking fdatasync on Tokio workers, capped at ~1.5k commits/s (not algorithmic) #5502https://github.com/developing-today/code/issues/5502
dezren39https://github.com/dezren39
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
on Nov 5, 2026https://github.com/developing-today/code/issues/5502#event-35239771512
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 5, 2026https://github.com/developing-today/code/issues/5502#issuecomment-6658620966
id(world): many_worlds p99 is blocking fdatasync on Tokio workers, capped at ~1.5k commits/s (not algorithmic) #5502https://github.com/developing-today/code/issues/5502
id(world): many_worlds p99 is blocking fdatasync on Tokio workers, capped at ~1.5k commits/s (not algorithmic) #5502https://github.com/developing-today/code/issues/5502
dezren39https://github.com/dezren39
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/queuedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fqueued%22
queue/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fparked%22
on Nov 5, 2026https://github.com/developing-today/code/issues/5502#event-35242362670
dezren39https://github.com/dezren39
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
on Nov 9, 2026https://github.com/developing-today/code/issues/5502#event-35549941829
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 9, 2026https://github.com/developing-today/code/issues/5502#issuecomment-6736285785
id(world): many_worlds p99 is blocking fdatasync on Tokio workers, capped at ~1.5k commits/s (not algorithmic) #5502https://github.com/developing-today/code/issues/5502
id(world): many_worlds p99 is blocking fdatasync on Tokio workers, capped at ~1.5k commits/s (not algorithmic) #5502https://github.com/developing-today/code/issues/5502
dezren39https://github.com/dezren39
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
on Nov 9, 2026https://github.com/developing-today/code/issues/5502#event-35551522226
dezren39https://github.com/dezren39
completedhttps://github.com/developing-today/code/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#7659https://github.com/developing-today/code/pull/7659
on Nov 10, 2026https://github.com/developing-today/code/issues/5502#event-35725688721
developing-todayhttps://github.com/apps/developing-today
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
status:in-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Ain-review%22
on Nov 10, 2026https://github.com/developing-today/code/issues/5502#event-35725692223
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 10, 2026https://github.com/developing-today/code/issues/5502#issuecomment-6778312204
#5502https://github.com/developing-today/code/issues/5502
fix(id): move world journal appends to writer thread #7659https://github.com/developing-today/code/pull/7659
6359a34https://github.com/developing-today/code/commit/6359a34bfb2a7100a17b41c1ab5621474c715cbf
3700d7ehttps://github.com/developing-today/code/commit/3700d7e0f0d560d7db28f3846988185b297461f4
fix(id): move world journal appends to writer thread #7659https://github.com/developing-today/code/pull/7659
fix(id): move world journal appends to writer thread #7659https://github.com/developing-today/code/pull/7659
f2223b6https://github.com/developing-today/code/commit/f2223b6dd84b1c64139fbcba7ff5bbabc10fcff7
id(world): many_worlds p99 is blocking fdatasync on Tokio workers, capped at ~1.5k commits/s (not algorithmic) #5502https://github.com/developing-today/code/issues/5502
id(world): many_worlds p99 latency 5,650.792 ms vs 50 ms target — profile and reduce (#557 remainder) #7064https://github.com/developing-today/code/issues/7064
dezren39https://github.com/dezren39
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
status/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fparked%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
queue/parkedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fparked%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
on Nov 10, 2026https://github.com/developing-today/code/issues/5502#event-35725751533
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/5502
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/5502
dezren39https://github.com/dezren39
app/idhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22app%2Fid%22
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
status:donehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Adone%22
task/triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Ftriage%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.