diff options
| author | Stefan Boberg <[email protected]> | 2025-10-10 15:34:30 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2025-10-10 15:34:30 +0200 |
| commit | 07e2df59856ef71bcac54d47c9d4d35b6f9ba7cd (patch) | |
| tree | 53b8f7e17e1f57af409e703f0a2ffcb7f90378ab /src/zenstore | |
| parent | made server count dynamic via `--count` argument (diff) | |
| download | zen-07e2df59856ef71bcac54d47c9d4d35b6f9ba7cd.tar.xz zen-07e2df59856ef71bcac54d47c9d4d35b6f9ba7cd.zip | |
added --corelimit option to zenserver
Diffstat (limited to 'src/zenstore')
| -rw-r--r-- | src/zenstore/blockstore.cpp | 4 | ||||
| -rw-r--r-- | src/zenstore/cache/structuredcachestore.cpp | 4 | ||||
| -rw-r--r-- | src/zenstore/compactcas.cpp | 6 | ||||
| -rw-r--r-- | src/zenstore/workspaces.cpp | 8 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/zenstore/blockstore.cpp b/src/zenstore/blockstore.cpp index 0861baaf8..0fee18420 100644 --- a/src/zenstore/blockstore.cpp +++ b/src/zenstore/blockstore.cpp @@ -1688,7 +1688,7 @@ TEST_CASE("blockstore.iterate.chunks") .Size = DefaultIterateSmallChunkWindowSize * 2}; BlockStoreLocation BadBlockIndex = {.BlockIndex = 0xfffff, .Offset = 1024, .Size = 1024}; - WorkerThreadPool WorkerPool(Max(std::thread::hardware_concurrency() - 1u, 4u)); + WorkerThreadPool WorkerPool(Max(GetHardwareConcurrency() - 1u, 4u)); std::vector<BlockStoreLocation> Locations{FirstChunkLocation, SecondChunkLocation, @@ -1807,7 +1807,7 @@ TEST_CASE("blockstore.thread.read.write") std::vector<BlockStoreLocation> ChunkLocations; ChunkLocations.resize(ChunkCount); - WorkerThreadPool WorkerPool(Max(std::thread::hardware_concurrency() - 1u, 8u)); + WorkerThreadPool WorkerPool(Max(GetHardwareConcurrency() - 1u, 8u)); { std::atomic<size_t> WorkCompleted = 0; Latch L(1); diff --git a/src/zenstore/cache/structuredcachestore.cpp b/src/zenstore/cache/structuredcachestore.cpp index da6acbde4..07e72ebb5 100644 --- a/src/zenstore/cache/structuredcachestore.cpp +++ b/src/zenstore/cache/structuredcachestore.cpp @@ -1582,7 +1582,7 @@ TEST_CASE("cachestore.threadedinsert") // * doctest::skip(true)) CreateDirectories(TempDir.Path()); - WorkerThreadPool ThreadPool(Max(std::thread::hardware_concurrency(), 8u)); + WorkerThreadPool ThreadPool(Max(GetHardwareConcurrency(), 8u)); GcManager Gc; auto JobQueue = MakeJobQueue(1, "testqueue"); ZenCacheNamespace Zcs(Gc, *JobQueue, TempDir.Path(), {}); @@ -2257,7 +2257,7 @@ TEST_CASE("cachestore.newgc.basics") std::vector<IoHash> CacheRecords; std::vector<IoHash> UnstructuredCacheValues; - WorkerThreadPool WorkerPool(Max(std::thread::hardware_concurrency() - 1u, 2u)); + WorkerThreadPool WorkerPool(Max(GetHardwareConcurrency() - 1u, 2u)); const auto TearDrinkerBucket = "teardrinker"sv; { diff --git a/src/zenstore/compactcas.cpp b/src/zenstore/compactcas.cpp index 5cc4dad54..bf843171e 100644 --- a/src/zenstore/compactcas.cpp +++ b/src/zenstore/compactcas.cpp @@ -1722,7 +1722,7 @@ TEST_CASE("compactcas.restart") { uint64_t ExpectedSize = 0; - WorkerThreadPool ThreadPool(Max(std::thread::hardware_concurrency() - 1u, 2u), "put"); + WorkerThreadPool ThreadPool(Max(GetHardwareConcurrency() - 1u, 2u), "put"); auto GenerateChunks = [&](CasContainerStrategy& Cas, size_t ChunkCount, uint64_t ChunkSize, std::vector<IoHash>& Hashes) { Latch WorkLatch(1); @@ -1959,7 +1959,7 @@ TEST_CASE("compactcas.restart") TEST_CASE("compactcas.iteratechunks") { std::atomic<size_t> WorkCompleted = 0; - WorkerThreadPool ThreadPool(Max(std::thread::hardware_concurrency() - 1u, 2u), "put"); + WorkerThreadPool ThreadPool(Max(GetHardwareConcurrency() - 1u, 2u), "put"); const uint64_t kChunkSize = 1048 + 395; const size_t kChunkCount = 63840; @@ -2035,7 +2035,7 @@ TEST_CASE("compactcas.iteratechunks") WorkLatch.Wait(); } - WorkerThreadPool BatchWorkerPool(Max(std::thread::hardware_concurrency() - 1u, 2u), "fetch"); + WorkerThreadPool BatchWorkerPool(Max(GetHardwareConcurrency() - 1u, 2u), "fetch"); { std::vector<std::atomic<bool>> FetchedFlags(Hashes.size()); std::atomic<uint64_t> FetchedSize = 0; diff --git a/src/zenstore/workspaces.cpp b/src/zenstore/workspaces.cpp index 4e7bd79a3..c2391588c 100644 --- a/src/zenstore/workspaces.cpp +++ b/src/zenstore/workspaces.cpp @@ -1356,7 +1356,7 @@ TEST_CASE("workspaces.scanfolder") { using namespace std::literals; - WorkerThreadPool WorkerPool(std::thread::hardware_concurrency()); + WorkerThreadPool WorkerPool(GetHardwareConcurrency()); ScopedTemporaryDirectory TempDir; std::filesystem::path RootPath = TempDir.Path(); @@ -1381,7 +1381,7 @@ TEST_CASE("workspace.share.paths") { using namespace std::literals; - WorkerThreadPool WorkerPool(std::thread::hardware_concurrency()); + WorkerThreadPool WorkerPool(GetHardwareConcurrency()); ScopedTemporaryDirectory TempDir; std::filesystem::path RootPath = TempDir.Path() / "workspace"; @@ -1409,7 +1409,7 @@ TEST_CASE("workspace.share.basic") { using namespace std::literals; - WorkerThreadPool WorkerPool(std::thread::hardware_concurrency()); + WorkerThreadPool WorkerPool(GetHardwareConcurrency()); ScopedTemporaryDirectory TempDir; std::filesystem::path RootPath = TempDir.Path() / "workspace"; @@ -1503,7 +1503,7 @@ TEST_CASE("workspace.share.alias") { using namespace std::literals; - WorkerThreadPool WorkerPool(std::thread::hardware_concurrency()); + WorkerThreadPool WorkerPool(GetHardwareConcurrency()); ScopedTemporaryDirectory TempDir; std::filesystem::path RootPath = TempDir.Path() / "workspace"; |