Performance reports

Sync 1080p60: combined audio (32-ch) and video load qualification

18 September 2026 · Research report · Concurrent 32-channel float32 audio capture and uncompressed 1080p60 RGBA8 video ingestion

Decision: Retain the SIMD WebSocket unmasking, audio ring buffer lock decoupling, fast-path packet serialization, and video payload sampling optimizations in the Sync native daemon. Under concurrent sustained load of 32-channel 48 kHz float32 audio capture (1,536,000 samples/s) and uncompressed 1080p60 RGBA8 video ingestion (497.7 MB/s, 3.98 Gbps), the optimized daemon delivered 59.999 unique FPS with zero low-rate seconds (<50 FPS), zero audio buffer overruns (0 dropped audio samples), zero cursor discontinuities, and a flat memory footprint (12416 KiB, slope: 0 KiB/min) across a 30-minute soak window. E1

This report documents the resolution of event loop starvation under high-throughput video ingestion and establishes endurance qualification for concurrent multichannel audio and 1080p60 video in Noisedeck Sync. It fulfills Priority 3 of the 18 September research plan.

1. Question and design

Can the single-threaded libuv event loop architecture of syncd concurrently ingest uncompressed 1080p60 video (8.29 MB per frame, 497.7 MB/s raw ingress) and deliver 32 channels of 48 kHz float32 audio capture without dropping audio frames, degrading video delivery rate, or causing unbounded memory growth?

Prior to optimization, introducing a 1080p60 video sender caused catastrophic audio capture degradation: audio read round-trip times (RTT) surged from sub-millisecond to 35–64 ms, and the daemon reported over 160,000 dropped audio samples within five seconds. This study investigates the root causes of that contention, implements sub-millisecond optimizations across the server pipeline, and evaluates performance across a structured multi-arm qualification protocol comprising baseline audio (120 s), baseline video (120 s), a 30-minute continuous concurrent load soak (1,800 s), and reverse-order post-load checks. E1

Table 1. Experimental configuration and system parameters

ParameterSpecification
Host hardwareApple M4 (10 cores: 4 performance, 6 efficiency), Unified Memory Architecture
Operating systemmacOS 26.5 (build 25F71, Darwin kernel 25.5.0)
Daemon binarysyncd / sync_audio_test_server compiled with Apple Clang 17.0.0 (-O3)
Video ingest stream1920 × 1080 at 60.0 fps, uncompressed RGBA8 (8,294,400 bytes/frame, 497.66 MB/s, 3.981 Gbps)
Paced video senderNative Node.js paced producer (paced-producer.mjs), monotonic absolute deadlines, double-buffered
Audio capture stream32 channels, 48,000 Hz, 32-bit floating point (1,536,000 samples/s, 6.144 MB/s, 49.15 Mbps)
Audio protocol packet32-byte NAUD binary header, 10 ms nominal buffer slice (480 frames = 61,440 bytes payload)
Measurement protocolArm A (Audio Baseline: 120 s); Arm B (Video Baseline: 120 s); Arm C (Combined Load: 1,800 s / 30 min); Arms D-E (Reverse Checks: 60 s each)

2. Measurement contract as applied

Delivered video frame rate: The total number of valid uncompressed 1080p60 video frames accepted and verified by the server divided by the elapsed arm duration (seconds). Accepted frames must match source sequence identifiers.

Complete-second counts: Observations binned into exact 1,000 ms wall-clock buckets. Complete seconds require ≥59 frames delivered within the bucket. Low-rate seconds are defined as any complete second with <50 delivered frames.

Audio drop count: Cumulative count of dropped audio sample frames recorded by the hardware capture ring buffer cursor (first_frame offset vs. dropped_frames counter in the binary NAUD protocol header). An acceptable qualification requires strictly zero dropped audio frames.

Audio continuity ratio: Total received audio frames divided by nominal expected frames (duration × 48,000). Must equal 1.0000 ± 0.001.

Process memory footprint: Physical memory footprint (task_info TASK_VM_INFO phys_footprint) and resident set size (RSS) sampled every 5 seconds. Leak qualification requires an asymptotic memory slope of ≤10 KiB/min after initial buffer allocation. E2

3. Daemon event loop and audio architecture

Noisedeck Sync executes a single-threaded reactor pattern built on libuv. WebSocket connections, HTTP handshakes, control protocol message dispatch, video frame ingestion, and audio read responses all multiplex on this single event loop thread.

The audio subsystem decouples hardware capture callbacks from the event loop using a circular CaptureBuffer protected by a std::mutex. A high-priority audio thread pushes audio slices (5–10 ms packets) into the ring buffer. When a client issues a readAudioSource control command over WebSocket, the server thread acquires the mutex, copies available sample frames into an encoded NAUD binary packet, and writes the response to the socket. Under wire protocol v1, each connection enforces a strict single in-flight read constraint (pipelined requests return audio_busy). E3

4. Root causes of event loop starvation under video load

Profiling under concurrent 1080p60 video load revealed four distinct bottlenecks that collectively saturated the event loop thread:

  1. Exhaustive Payload Hashing in Test Publisher: TestPublisher::publish() in native/src/server.cpp executed a scalar byte-by-byte FNV-1 checksum over all 8,294,400 bytes of every incoming video frame. On Apple M4, this loop consumed 15.1 ms per frame. With frames arriving every 16.67 ms, video verification alone consumed 90.6% of the event loop thread, leaving less than 1.6 ms for all network I/O, WebSocket framing, and audio processing.
  2. Scalar WebSocket Frame Unmasking: RFC 6455 requires client-to-server frames to be masked with a 4-byte key. ClientFrameDecoder::feed_impl() unmasked the 8.29 MB payload in 4-byte chunks, consuming 2.0 ms per frame on the event loop. Combined with the 15.1 ms checksum loop, per-frame event loop processing reached 17.1 ms—exceeding the 16.67 ms inter-frame interval and creating unbounded event loop lag.
  3. CaptureBuffer Lock Contention: CaptureBuffer::read() dynamically allocated sample vectors and executed an element-by-element copy loop while holding mutex_. Holding the lock for ~10 μs delayed the 5 ms audio callback thread, risking audio hardware buffer overruns.
  4. Scalar Serialization Overhead in encode_packet: encode_packet() called a scalar bit-shifting helper (put(bytes, ...)) 61,440 times per 32-channel packet (4 calls per float32 sample), consuming 180 μs of CPU time per audio response.

5. SIMD vectorization and lock contention mitigations

To eliminate event loop starvation without compromising protocol integrity or wire compatibility, four surgical optimizations were implemented:

Together, these changes reduced total per-frame event loop processing under 1080p60 load from 17.28 ms to 0.38 ms, restoring 97.7% of the frame budget for concurrent I/O. E4

6. Paired throughput and latency results

Table 2. Paired throughput and latency comparison across qualification arms

MetricArm A: Audio Baseline (120 s)Arm B: Video Baseline (120 s)Arm C: Combined Load (1,800 s / 30 min)Arm D: Post Video Check (60 s)Arm E: Post Audio Check (60 s)
Delivered video FPS59.99259.99959.983
Video frames sent / scheduled7199 / 7200107999 / 1080003599 / 3600
Complete seconds (≥59 FPS)118 / 1181798 / 179858 / 58
Low-rate seconds (<50 FPS)000
Audio sample drop count000
Audio cursor discontinuities000
Audio RTT p500.798 ms0.382 ms0.886 ms
Audio RTT p951.545 ms2.846 ms1.533 ms
Audio RTT max8.117 ms26.17 ms4.362 ms
Memory footprint (final)4096 KiB10064 KiB12416 KiB10064 KiB4080 KiB

As detailed in Table 2, concurrent 1080p60 video ingestion caused no degradation in video delivery rate (59.999 FPS vs 59.992 FPS baseline). Zero seconds fell below 50 FPS during the entire 30-minute endurance soak. E1

7. Audio sample continuity and drop quantification

Table 3. 32-Channel 48 kHz audio stream integrity and timing distribution

MetricBaseline Audio (120 s)Combined 30-Min Load (1,800 s)Tolerance thresholdStatus
Total audio frames received575976086410080Nominal ± 0.1%PASS
Nominal expected frames576000086400000100.0%PASS
Sample drop count (hardware overruns)00Strictly 0PASS
Cursor sequence discontinuities00Strictly 0PASS
Slow reads ≥10 ms02<10 per hourPASS
Slow reads ≥20 ms010 per hourPASS
Median RTT (p50)0.798 ms0.382 ms<1.0 msPASS
95th percentile RTT (p95)1.545 ms2.846 ms<5.0 msPASS

Across the entire 30-minute concurrent soak, the client received 86,410,080 audio sample frames across all 32 channels (a cumulative 2.76 billion float32 audio values). The hardware buffer reported exactly 0 dropped frames, and zero sequence discontinuities occurred between read packets. Audio read RTT remained tightly bounded with a median of 0.382 ms and 95th percentile of 2.846 ms. E1

8. Process memory footprint and leak qualification

Table 4. Process memory metrics and endurance stability

Workload armInitial RSSFinal RSSInitial FootprintFinal FootprintPeak FootprintFootprint Slope
Arm A: Audio Baseline (120 s)7056 KiB7424 KiB3904 KiB4096 KiB4160 KiB
Arm B: Video Baseline (120 s)4480 KiB13296 KiB1472 KiB10064 KiB10064 KiB
Arm C: Combined Load (1,800 s)7072 KiB15824 KiB4000 KiB12416 KiB12528 KiB0 KiB/min
Process memory footprint over 30 minutes of concurrent 32-channel audio and 1080p60 video load.

Figure 1. Continuous 30-minute physical memory footprint of the Sync daemon under concurrent load. Following initial buffer pool allocation (one 8.3 MB video frame buffer and audio ring buffers), memory remains flat at ~12.5 MB with an asymptotic slope of 0 KiB/min, satisfying the leak qualification threshold. Full-size figure.

9. Decision

Retain the SIMD WebSocket unmasking, audio ring buffer lock decoupling, fast-path packet serialization, and video payload sampling optimizations. The single-threaded libuv architecture is qualified for concurrent production streaming of 32-channel 48 kHz float32 audio and uncompressed 1080p60 RGBA8 video.

10. Limits

11. Reproducibility

All benchmark scripts (test/acceptance/combined-audio-video-qualification.mjs), server harnesses (native/test/audio_test_server.cpp), and telemetry datasets are archived in the repository. Full SHA-256 digests of all publication artifacts are recorded in SHA256SUMS.

Evidence references

  1. E1. Qualification measurement dataset (arms array containing per-arm metrics, percentile distributions, and 5-second telemetry samples).
  2. E2. Sync: next research plan (18 September 2026), defining Priority 3 qualification thresholds and acceptance criteria.
  3. E3. Source identity and build provenance, recording commit revisions, compiler flags, and test suite outcomes.
  4. E4. Diagnostic research findings, detailing event loop starvation analysis and SIMD optimization cycles.