Skip to content

Coalescing the three WAL writes per record is not a win #63

Description

@martian56

Tried assembling each log record once and issuing a single positional write instead of three, one each for header, payload and stop marker. An eight page commit group was paying twenty four syscalls on the path every commit waits behind.

Benched against main with packing already in:

  • linux-x64-full: writes plus 11.2 percent, write p99 4.47 to 2.13 ms
  • linux-arm64-full: plus 6.3 percent
  • linux-x64-1cpu-1gb: minus 0.8 percent
  • linux-x64-2cpu-2gb: minus 6.5 percent, though p99.9 24.3 to 13.5 ms
  • windows-x64-full: minus 13.4 percent, p99.9 31.7 to 56.0 ms

Net neutral with one real gain and one real loss, so it stays unmerged on branch wal-one-write. Syscall count is evidently not what limits the commit group; the sync still is. Recording it so nobody spends the idea twice.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions