Skip to content

feat(shared-fs): add mounted path profiling - #337

Open
peerbit-org wants to merge 1 commit into
masterfrom
peerbit-org/mount-trace
Open

peerbit-org wants to merge 1 commit into
masterfrom
peerbit-org/mount-trace

Conversation

@peerbit-org

Copy link
Copy Markdown
Collaborator

Summary

  • add opt-in --mount-profile NDJSON timing for native callbacks, Go IPC queue wait and round trip, Node IPC service, the mount fsync local-generation fence, and the exact Peerbit-facing writeFile call
  • correlate Go queue/round-trip and Node v1/v2 service events by request id
  • keep profiling report-only: synchronous throws and rejected async sinks are isolated, and the disabled path performs no clock read or event/detail construction
  • document overlapping timing boundaries and explicit exclusions, including kernel-cache time, remote replication/persisted receipts, and unavailable inner Peerbit phases

This is instrumentation, not a performance claim or a protocol/storage change. It is intended to tell us whether the next mounted-path optimization belongs in callback handling, the serialized adapter lane, framing/loopback, Node service, mount commit logic, or the underlying write.

Local validation

  • focused shared-fs tests: 120/120 with --retry=0
  • focused CLI adapter tests: 8/8 with --retry=0
  • shared-fs and CLI builds
  • generic Go tests and vet
  • Go race-enabled suite, including concurrent NDJSON record serialization
  • Windows native-tag cross-compilation
  • formatting and diff checks

A base-versus-instrumented disabled Go getattr IPC benchmark measured 27,421 ns versus 27,560 ns median (about +0.5%, within noise), with exactly 85 allocations/op and about 3,581 B/op in both builds.

Local macOS native-tag execution remains unavailable because this host does not have macFUSE headers. Exact Linux/macOS/Windows CI is required.

Known unrelated gate

One final full-suite run with profiling disabled reproduced the existing upstream persisted-receipt/session liveness issue: the process-crash disposal test timed out after 36 confirmed entries while waiting for two persisted replicas, and persistent multiwriter passed only on configured retry x1. That run was not rerun. The focused tracing paths are zero-retry clean, and the tracing patch has no active clock/event path when the profile sink is absent.

Do not merge on a green badge alone: inspect raw portable logs and require zero retry markers on Ubuntu, macOS, and Windows.

@peerbit-org

Copy link
Copy Markdown
Collaborator Author

Merge hold: the tracing implementation is clean, but exact-head portable durability did not pass the required zero-retry gate.

Exact head 5c1671cd1f757fc8baeac4a5c991123d9815edc7, first workflow attempt 33942314205:

  • Ubuntu job 101241983748 concluded green only after retry x1 on preserves admitted naming-conflict heads and a tombstone after an access-controlled source is disposed (113.6 s).
  • macOS job 101241983808 hard-failed after retry. One execution timed out persisted delivery at minAcks=2 after 46 confirmed entries; the other timed out waiting for a replicator.
  • Windows job 101241983823 hard-failed after retry. Both executions timed out because persistedReceiptPeerSession(remoteHash) never appeared.

No workflow rerun was requested. The mount-profile-specific tests passed on all three systems (mount-backend 94, ipc 22, mount-profile 4), as did all native adapter jobs, package installs, and cross-OS interop. Profiling was disabled in the failing lifecycle tests, and the absent-sink path performs no clock read or event construction. These failures match the existing upstream receipt/session/replicator liveness blocker rather than this instrumentation.

Keep this PR open and unmerged until an upstream fix/cohort is available and the exact rebased head passes fresh Ubuntu/macOS/Windows portable coverage with zero retry markers.

@peerbit-org peerbit-org mentioned this pull request Sep 5, 2026

This branch has not been deployed

No deployments
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