summaryrefslogtreecommitdiff
path: root/extstore.c
Commit message (Collapse)AuthorAgeFilesLines
* core: give threads unique namesdormando2022-11-011-1/+16
| | | | | allow users to differentiate thread functions externally to memcached. Useful for setting priorities or pinning threads to CPU's.
* extstore: avoid looping IO queues on submissiondormando2021-11-181-16/+24
| | | | | | | | | with low (ie; 1) IO threads, and a long IO depth (10k+) that might suddenly appear during a disk hiccup, we can cause a slowdown as each worker thread submission walks the entire queue. this fully avoids walking objects while holding any lock, though we can still do that a bit on the IO thread's end when reading the queue.
* extstore: use fcntl locking on disk filedormando2020-11-111-2/+19
| | | | | | | | | if you accidentally start memcached with the same options twice, extstore is initiated before the listener sockets and will happily truncate its own file. So this avoids that. Keep in mind any other process can still wipe the file clean!
* extstore: fix some valgrind errors.dormando2020-04-111-1/+1
|
* minor adjustment to previous commitdormando2020-04-101-4/+0
| | | | debug message was already there.
* fix extstore reads for OSX/cygwindormando2020-04-101-2/+9
| | | | | | | pread[v]() is missing on some platforms. We had a test added to build under OS X, but the lseek arguments were swapped and tests would've never passed. I never force-tested the replacement code until checking this out for a cygwin build error :(
* auth file, using alternative bcmp implementationDavid Carlier2020-01-131-1/+1
| | | | | | | | | ... instead to check the token. less optimised than the usual memcmp especially it goes through the whole buffers but more resilient against possible attacks. While at it, constifying a var which should have been.
* extstore: fix indentationdormando2019-08-271-1/+1
| | | | thanks to 'neatlife' on github.
* extstore: emulate pread(v) for macOSGregor Jasny2019-08-271-0/+11
|
* extstore: fix segfault if page_count is too high.dormando2019-04-271-1/+12
| | | | | | leaked into a runtime bug :( fixes #482
* extstore: balance IO thread queues1.5.11dormando2018-10-021-4/+28
| | | | | | | | | queues were roundrobin before. during sustained overload some queues can get behind while other stays empty. Simply do a bit more work to track depth and pick the lowest queue. This is fine for now since the bottleneck remains elsewhere. Been meaning to do this, benchmark work made it more obvious.
* extstore JBOD supportdormando2018-08-061-31/+93
| | | | | | | | | | | | | | | | Just a Bunch Of Devices :P code exists for routing specific devices to specific buckets (lowttl/compact/etc), but enabling it requires significant fixes to compaction algorithm. Thus it is disabled as of this writing. code cleanups and future work: - pedantically freeing memory and closing fd's on exit - unify and flatten the free_bucket code - defines for free buckets - page eviction adjustment (force min-free per free bucket) - fix default calculation for compact_under and drop_under - might require forcing this value only on default bucket
* Bugfix: missing initialization code for extstore maint thread objectsOri Shalev2018-03-241-0/+2
| | | | | | The extstore maintenance thread takes permanent ownership of its mutex. Grabbing an uninitialized mutex can result in undefined behavior. In this case the memory is zeroed so probably no harm.
* Spelling fixesJosh Soref2018-03-141-2/+2
| | | | | | | | | | * automover * avoiding * compress * fails * successfully * success * tidiness
* extstore: better error handling for init.dormando2017-12-171-10/+36
| | | | | | can add more later; extremely unlikely to happen. can/should convert more functions to use extstore_err + codes.
* extstore: crawler fix and ext_low_ttl optiondormando2017-11-281-0/+1
| | | | | | | | | | | | LRU crawler was not marking reclaimed expired items as removed from the storage engine. This could cause fragmentation to persist much longer than it should, but would not cause any problems once compaction started. Adds "ext_low_ttl" option. Items with a remaining expiration age below this value are grouped into special pages. If you have a mixed TTL workload this would help prevent low TTL items from causing excess fragmentation/compaction. Pages with low ttl items are excluded from compaction.
* extstore: support chunked items.dormando2017-11-281-3/+20
| | | | | | item size max must be <= wbuf_size. reads into iovecs, writes out of same iovecs.
* extstore: split write into write_request+writedormando2017-11-281-16/+28
| | | | | | | | write_request returns a buffer to write into, which lets us not corrupt the active item with the hash and crc. "technically" we can save 24 bytes per item in storage but I'll leave that for a later optimization, in case we want to stuff more data into the header.
* external storage base commitdormando2017-11-281-0/+800
been squashing reorganizing, and pulling code off to go upstream ahead of merging the whole branch.