| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
would previously index into a reserved-but-not-sized vector which is bad but not crash-inducing bad
|
| |
|
| |
* Don't use copy of Payloads array when fetching memcached payload in GC
|
| |
|
|
|
| |
* Adding some more trace scopes for better visiblity
* Removed spammy trace scope when replaying oplogs
* Remove "::Disk" from trace scopes - redundant now that we have merge disk and memory layers
|
| |
|
|
|
|
|
|
| |
- Improvement: Refactor memory cache for faster trimming and correct trim reporting
- Improvement: Added trace scopes for memory cache trimming
Adding a link back to the cache item payload on the memory cache item allows us to iterate over only the items cached in memory instead of over the entire index.
This also allows us to do efficient compact of the memory cache array when trimming.
It adds 4 bytes of overhead to each item cached in memory.
|
| |
|
|
|
|
| |
- Make sure we don't hold the namespace bucket lock when we create buckets to avoid deadlock
- Pass lock scope to helper functions to clarify locking rules
- Block flush and gc operations for a bucket that is not yet initialized
- Add ZenCacheDiskLayer::GetOrCreateBucket to avoid code duplication
|
| |
|
|
|
| |
GatherReferences (#591)
* Use correct iterator index when looking up memcached payload in gatherreferences
|
| |
|
|
|
| |
* reserve vectors in gcv2 upfront
* set max load factor for robin_map indexes to reduce memory usage
* set min load factor for robin_map indexes to allow them to shrink
|
| |
|
|
| |
* do a more accurate memory usage estimation for memcached entries
* early exit when checking memcache usage
|
| |
|
| |
- Improvement: Reduce memory usage in GC and diskbucket flush
|
| |
|
|
|
|
| |
- Improvement: GCv2: Use separate PreCache step to improve concurrency when checking references
- Improvement: GCv2: Improved verbose logging
- Improvement: GCv2: Sort chunks to read by block/offset when finding references
- Improvement: GCv2: Exit as soon as no more unreferenced items are left
|
| |
|
| |
- Improvement: Use two global worker thread pools instead of ad-hoc creation of worker pools
|
| |
|
|
|
|
| |
- Improvement: Added more trace scopes for GCv2
- Bugfix: Make sure we can override flags to "false" when running `zen gc` commmand
- `smallobjects`, `skipcid`, `skipdelete`, `verbose`
|
| |
|
|
|
| |
the previous implementation of in-memory index snapshots serialise data to memory before writing to disk and vice versa when reading. This leads to some memory spikes which end up pushing useful data out of system cache and also cause stalls on I/O operations.
this change moves more code to a streaming serialisation approach which scales better from a memory usage perspective and also performs much better
|
| |
|
|
| |
- GcScheduler will now cancel any running GC when it shuts down.
- Old GC is rather limited in *when* it reacts to cancel of GC. GCv2 is more responsive.
|
| |
|
|
| |
* reduce work when there are no blocks to compact
* fix lock scopes
|
| |
|
|
|
|
|
|
|
|
|
| |
- Feature: Added new options to zenserver for GC V2
- `--gc-compactblock-threshold` GCV2 - how much of a compact block should be used to skip compacting the block, default is 90%
- `--gc-verbose` GCV2 - enable more verbose output when running a GC pass
- Feature: Added new options to `zen gc` command for GC V2
- `--compactblockthreshold` GCV2 - how much of a compact block should be used to skip compacting the block, default is 90%
- `--verbose` GCV2 - enable more verbose output when running a GC pass
- Feature: Added new parameters for endpoint `admin/gc` (PUT)
- `compactblockthreshold` GCV2 - how much of a compact block should be used to skip compacting the block, default is 90%
- `verbose` GCV2 - enable more verbose output when running a GC pass
|
| |
|
|
|
| |
- Refactor GCV2 so GcReferencer::RemoveExpiredData returns a store compactor, moving out the actual disk work from deleting items in the index.
- Refactor GCV2 GcResult to reuse GcCompactStoreStats and GcStats
- Make Compacting of stores non-parallell to not eat all the disk I/O when running GC
|
| |
|
|
|
|
|
|
|
| |
* make BlockingQueue::m_CompleteAdding non-atomic
* ZenCacheDiskLayer::Flush logging
* name worker threads in ZenCacheDiskLayer::DiscoverBuckets
* name worker threads in gcv2
* improved logging in ZenServerInstance
* scrub threadpool naming
* remove waitpid handling, we should just call wait to kill zombie processes
|
| |
|
|
|
| |
* use PayloadIndex for indexing into payload array
* naming cleanup
* fix metadata index in CacheBucket::CompactState
|
| | |
|
| |
|
|
| |
* don't touch non-locked data when creating manifest
* safety assert for test dir
|
| | |
|
| |
|
|
|
|
|
| |
- Improvement: Use GC reserve when writing index/manifest for a disk cache bucket when disk is low when available
- Improvement: Demote errors to warning for issues that are not critical and we handle gracefully
- Improvement: Treat more out of memory errors from windows as Out Of Memory errors
Fixed wrong sizeof() statement for compactcas index (luckily the two structs are of same size)
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
* set MaxBlockCount at init
* properly calculate total size
* basic blockstore compact blocks test
* correct detection of block swap
* Use one implementation for CreateRandomBlob
* reduce some data sets to increase speed of tests
* reduce test time
* rename BlockStoreCompactState::AddBlock -> BlockStoreCompactState::IncludeBlock
|
| |
|
|
|
|
|
| |
* reduce memory footprint for disk cache separate dense arrays for rawhash+rawsize and memcache buffer
* don't write RawHash/RawSize for buckets with no such metadata
* helper functions
* make index into metadata and cached payload type safe
* helper functions for memcached
|
| |
|
|
| |
* Multithread init and flush of cache bucket
* tweaked threading cound for bucket discovery, disklayer flush and gc v2
|
| |
|
|
|
| |
- Feature: New parameter for endpoint `admin/gc` (GET) `details=true` which gives details stats on GC operation when using GC V2
- Feature: New options for zen command `gc-status`
- `--details` that enables the detailed output from the last GC operation when using GC V2
|
| |
|
| |
- Feature: New garbage collection implementation, still in evaluation mode. Enabled by `--gc-v2` command line option
|
| |
|
|
| |
exclusive lock (#502)
|
| |
|
|
| |
- Feature: Added `--cache-memlayer-sizethreshold` option to zenserver to control at which size cache entries get cached in memory
- Changed: Merged cache memory layer with cache disk layer to reduce memory and cpu overhead
|
| |
|
| |
* Remove any unreferenced blocks in block store on open
|
| |
|
|
| |
(#491)
|
| |
|
|
|
|
| |
* Don't prune block locations due to missing blocks a startup
This makes the behaviour consistent with FileCas - you can have an index that is not fully backed by data.
Asking for a location that is not backed by data results in getting an empty result back
Also, don't try to GC blocks that are unknown to the block store at the time of snapshot (to avoid removing data that comes in after GatherReferences in GC)
|
| |
|
|
| |
- Feature: Add `--skip-delete` option to gc command
- Bugfix: Fix implementation when claiming GC reserve during GC
|
| | |
|
| | |
|
| |
|
|
|
| |
- Feature: Add caching of referenced CId content for structured cache records, this avoid disk thrashing when gathering references for GC
- disabled by default, enable with `--cache-reference-cache-enabled`
- Improvement: Faster collection of referenced CId content in project store
|
| |
|
|
|
|
|
| |
* added string_view helpers for ParseHexBytes/ParseHexNumber
* reject known bad buckets in structured cache put handler (32-character hex bucket names are rejected)
* also added bucket rejection logic to bucket discovery
* added rejected_writes stat to HttpStructuredCache
|
| |
|
|
|
|
|
|
|
| |
* make sure we hold the index lock when reading payload data in reclaim space
* don't use index snapshot when updating index in reclaim space
* check that things have not moved under our feet
* don't touch m_Payloads without a lock
* start write block index on the highest block index
* we don't need to bump writeblockindex when stopping write to a block, we will bump appropriately when we start a new block
* changelog
|
| |
|
| |
* Don't block all write access to all buckets when doing GatherReferences/CollectGarbage
|
| |
|
|
|
| |
- Bugfix: Fix scrub messing up payload and access time in disk cache bucket when compacting index
- Improvement: Split up disk cache bucket index into hash lookup and payload array to improve performance
- Improvement: Reserve space up front for compact binary output when saving cache bucket manifest to improve performance
|
| |
|
|
|
|
|
|
|
|
| |
- Improvement: Reduce time a cache bucket is locked for write when flushing/garbage collecting
- Change format for faster read/write and reduced size on disk
- Don't lock index while writing manifest to disk
- Skip garbage collect if we are currently in a Flush operation
- BlockStore::Flush no longer terminates currently writing block
- Garbage collect references to currently writing block but keep the block as new data may be added
- Fix BlockStore::Prune used disk space calculation
- Don't materialize data in filecas when we just need the size
|
| |
|
|
|
|
| |
- Improvement: Catch Out Of Memory and Out Of Disk exceptions and report back to reqeuster without reporting an error to Sentry
- Improvement: If creating bucket fails when storing and item in the structured cache, log a warning and propagate error to requester without reporting an error to Sentry
- Improvement: Make an explicit flush of the active block written to in blockstore flush
- Improvement: Make sure cache and cas MakeIndexSnapshot does not throw exception on failure which would cause and abnormal termniation at exit
|
| |
|
|
|
|
| |
- Feature: Add lightweight GC that only removes items from cache/project store without cleaning up data referenced in Cid store
- Add `skipcid` parameter to http endpoint `admin/gc`, defaults to "false"
- Add `--skipcid` option to `zen gc` command, defaults to false
- Add `--gc-lightweight-interval-seconds` option to zenserver
|
| |
|
|
|
| |
- Feature: Add detailed stats on requests and data sizes on a per-bucket level, use parameter `cachestorestats=true` on the `/stats/z$` endpoint to enable
- Feature: Add detailed stats on requests and data sizes on cidstore, use parameter `cidstorestats=true` on the `/stats/z$` endpoint to enable
- Feature: Dashboard now accepts parameters in the URL which is passed on to the `/stats/z$` endpoint
|
| |
|
| |
currently, only Windows (using Projected File System) is supported
|
| |
|
|
|
| |
* more trace scopes
* Make sure ReplayLogEntries uses the correct size for oplog buffer
* changelog
|
| |
|
|
| |
* Increase timeout and number of retries in CacheBucket::PutStandaloneCacheValue when moving temporary file into place
* changelog
|
| | |
|