10000 Increase queue sizes to handle larger workloads by domenkozar · Pull Request #687 · cachix/cachix · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Increase queue sizes to handle larger workloads #687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cachix/src/Cachix/Client/PushQueue.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ startWorkers numWorkers mkProducer pushParams = do
-- start query worker
(newQueryQueue, newPushQueue, newLock) <-
atomically $
(,,) <$> TBQueue.newTBQueue 10000 <*> TBQueue.newTBQueue 10000 <*> Lock.new
(,,) <$> TBQueue.newTBQueue 100_000 <*> TBQueue.newTBQueue 100_000 <*> Lock.new
let queryWorkerState = QueryWorkerState newQueryQueue S.empty newLock
queryWorker <- async $ queryLoop queryWorkerState newPushQueue pushParams

Expand Down
2 changes: 1 addition & 1 deletion cachix/src/Cachix/Daemon/PushManager.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ newPushManagerEnv pushOptions pmPushParams onPushEvent pmLogger = liftIO $ do
pmPushJobs <- newTVarIO mempty
pmPendingJobCount <- newTVarIO 0
pmStorePathIndex <- newTVarIO mempty
pmTaskQueue <- newTBMQueueIO 1000
pmTaskQueue <- newTBMQueueIO 100_000
pmTaskSemaphore <- QSem.newQSem (numJobs pushOptions)
pmLastEventTimestamp <- newTVarIO =<< getCurrentTime
let pmOnPushEvent id pushEvent = updateTimestampTVar pmLastEventTimestamp >> onPushEvent id pushEvent
Expand Down
0