summaryrefslogtreecommitdiff
path: root/t/issue_42.t
Commit message (Collapse)AuthorAgeFilesLines
* Find perl via /usr/bin/env instead of directlyDavid CARLIER2022-08-251-1/+1
| | | | | At least FreeBSD has perl in /usr/local/bin/perl and no symlink by default.
* move mem_requested from slabs.c to items.cdormando2019-07-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mem_requested is an oddball counter: it's the total number of bytes "actually requested" from the slab's caller. It's mainly used for a stats counter, alerting the user that the slab factor may not be efficient if the gap between total_chunks * chunk_size - mem_requested is large. However, since chunked items were added it's _also_ used to help the LRU balance itself. The total number of bytes used in the class vs the total number of bytes in a sub-LRU is used to judge whether to move items between sub-LRU's. This is a layer violation; forcing slabs.c to know more about how items work, as well as EXTSTORE for calculating item sizes from headers. Further, it turns out it wasn't necessary for item allocation: if we need to evict an item we _always_ pull from COLD_LRU or force a move from HOT_LRU. So the total doesn't matter. The total does matter in the LRU maintainer background thread. However, this thread caches mem_requested to avoid hitting the slab lock too frequently. Since sizes_bytes[] within items.c is generally redundant with mem_requested, we now total sizes_bytes[] from each sub-LRU before starting a batch of LRU juggles. This simplifies the code a bit, reduces the layer violations in slabs.c slightly, and actually speeds up some hot paths as a number of branches and operations are removed completely. This also fixes an issue I was having with the restartable memory branch :) recalculating p->requested and keeping a clean API is painful and slow. NOTE: This will vary a bit compared to what mem_requested originally did, mostly for large chunked items. For items which fit inside a single slab chunk, the stat is identical. However, items constructed by chaining chunks will have a single large "nbytes" value and end up in the highest slab class. Chunked items can be capped with chunks from smaller slab classes; you will see utilization of chunks but not an increase in mem_requested for them. I'm still thinking this through but this is probably acceptable. Large chunked items should be accounted for separately, perhaps with some new counters so they can be discounted from normal calculations.
* remove inline_ascii_response optiondormando2019-05-201-4/+8
| | | | | | Has defaulted to false since 1.5.0, and with -o modern for a few years before that. Performance is fine, no reported bugs. Always was the intention. Code is simpler without the options.
* flip defaults and add long options1.5.0dormando2017-07-201-1/+1
| | | | | | | | | -o -> --extended, but some of those options should be top level. can fix in future iterations. update --help and golf the wordcount a bit add long options to manpage
* minor test fixes for inline asciihdr changedormando2017-01-221-1/+0
|
* conditionally don't inline the ASCII VALUE linedormando2017-01-071-1/+2
| | | | | | missing methods of changing the value. uses what should be a high speed itoa instead of snprintf in a handful of places. Should speed up sets, reduce memory overhead, and ideally not slow down gets too much.
* Issue 42: Stats slabs should include the number of requested bytesTrond Norbye2009-08-191-0/+21