Performance Improvements Proposal for Kokaq Core Heap #1
iwannabebot
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
We’re exploring targeted performance optimizations to scale the core peek-lock heap in Kokaq, especially under high-concurrency, high-volume workloads. This thread summarizes proposed enhancements across memory usage, disk I/O, and network efficiency.
Goals
Observations
The core priority queue with peek-lock currently:
PeekLock()responses.As Kokaq usage scales, especially in queue-heavy scenarios, this model may:
Ack()/Unlock().Proposed Improvements
1. Memory Usage
id,priority,lock state)[]*Item(pointers) to avoid slice reallocation and copyingsync.Poolfor object reuse to reduce GC pressure2. I/O Efficiency
Ack()/Unlock()with WALmmap) to reduce syscall cost and leverage OS page caching3. Network Bandwidth
PeekLock():{ "id": "...", "priority": 1, "lockToken": "...", "expiresAt": "..." }GET /item/{id}endpoint to retrieve full payloadPeekLockBatch(n),AckBatch,UnlockBatch4. Multi-Lock TTL Expiry Strategy
lockToken: uuidlockedUntil: timestamplockedUntil < now, the item is automatically considered "unlocked"lockedUntilfor quick expiry scans5. Optional: Horizontal Scalability Hooks
hash(itemID)) to distribute workload across heap instancesAck()andUnlock()Expected Gains
Request for Feedback
We're inviting input from the community on:
mmapbe more acceptable than paged heap under scale?Beta Was this translation helpful? Give feedback.
All reactions