diff options
| author | Dan Engelbrecht <[email protected]> | 2024-08-22 16:03:01 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-08-22 16:03:01 +0200 |
| commit | 203d3f03f0d0ef51f414b5344462bde0a8fcaf1b (patch) | |
| tree | 2d0cbe07dbf6b2d81a91e15c823ea0209205b39c /src/zenstore | |
| parent | safer calls to IsProcessRunning (#131) (diff) | |
| download | zen-203d3f03f0d0ef51f414b5344462bde0a8fcaf1b.tar.xz zen-203d3f03f0d0ef51f414b5344462bde0a8fcaf1b.zip | |
separate worker pools into burst/background to avoid background jobs blocking client requests (#134)
Diffstat (limited to 'src/zenstore')
| -rw-r--r-- | src/zenstore/cache/cachedisklayer.cpp | 4 | ||||
| -rw-r--r-- | src/zenstore/cas.cpp | 2 | ||||
| -rw-r--r-- | src/zenstore/gc.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/zenstore/cache/cachedisklayer.cpp b/src/zenstore/cache/cachedisklayer.cpp index 67910fa7f..5d167fc47 100644 --- a/src/zenstore/cache/cachedisklayer.cpp +++ b/src/zenstore/cache/cachedisklayer.cpp @@ -4035,7 +4035,7 @@ ZenCacheDiskLayer::DiscoverBuckets() RwLock SyncLock; - WorkerThreadPool& Pool = GetLargeWorkerPool(); + WorkerThreadPool& Pool = GetLargeWorkerPool(EWorkloadType::Burst); Latch WorkLatch(1); for (auto& BucketPath : FoundBucketDirectories) { @@ -4149,7 +4149,7 @@ ZenCacheDiskLayer::Flush() } } { - WorkerThreadPool& Pool = GetMediumWorkerPool(); + WorkerThreadPool& Pool = GetMediumWorkerPool(EWorkloadType::Burst); Latch WorkLatch(1); try { diff --git a/src/zenstore/cas.cpp b/src/zenstore/cas.cpp index f300c08e3..871558a52 100644 --- a/src/zenstore/cas.cpp +++ b/src/zenstore/cas.cpp @@ -113,7 +113,7 @@ CasImpl::Initialize(const CidStoreConfiguration& InConfig) // Initialize payload storage { - WorkerThreadPool& WorkerPool = GetMediumWorkerPool(); + WorkerThreadPool& WorkerPool = GetMediumWorkerPool(EWorkloadType::Burst); std::vector<std::future<void>> Work; Work.emplace_back( WorkerPool.EnqueueTask(std::packaged_task<void()>{[&]() { m_LargeStrategy.Initialize(m_Config.RootDirectory, IsNewStore); }})); diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp index 3f3adeb82..d6bf99c3e 100644 --- a/src/zenstore/gc.cpp +++ b/src/zenstore/gc.cpp @@ -632,7 +632,7 @@ GcManager::CollectGarbage(const GcSettings& Settings) std::unordered_map<std::unique_ptr<GcStoreCompactor>, GcCompactStoreStats*> StoreCompactors; RwLock StoreCompactorsLock; - WorkerThreadPool& ThreadPool = Settings.SingleThread ? GetSyncWorkerPool() : GetMediumWorkerPool(); + WorkerThreadPool& ThreadPool = Settings.SingleThread ? GetSyncWorkerPool() : GetMediumWorkerPool(EWorkloadType::Background); ZEN_INFO("GCV2: Removing expired data from {} referencers", m_GcReferencers.size()); if (!m_GcReferencers.empty()) @@ -2097,7 +2097,7 @@ GcScheduler::ScrubStorage(bool DoDelete, bool SkipCid, std::chrono::seconds Time Stopwatch Timer; ZEN_INFO("scrubbing STARTING (delete mode => {}, skip CID => {})", DoDelete, SkipCid); - WorkerThreadPool& ThreadPool = GetMediumWorkerPool(); + WorkerThreadPool& ThreadPool = GetMediumWorkerPool(EWorkloadType::Background); ScrubContext Ctx{ThreadPool, Deadline}; try |