Skip to content
Commits on Jun 24, 2016
  1. @rmccullagh @dormando
  2. @dormando

    bump binary.t

    dormando committed Jun 24, 2016
  3. @dormando

    cache_memlimit command for tuning runtime maxbytes

    Allows dynamically increasing the memory limit of a running system, if memory
    isn't being preallocated.
    
    If `-o modern` is in use, can also dynamically lower memory usage. pages are
    free()'ed back to the OS via the slab rebalancer as memory is freed up. Does
    not guarantee the OS will actually give the memory back for other applications
    to use, that depends on how the OS handles memory.
    dormando committed Jun 23, 2016
  4. @dormando

    finish stats_sizes rewrite

    Now relies on CAS feature for runtime enable/disable tracking. Still usable if
    enabled at starttime with CAS disabled. Also adds start option `-o
    track_sizes`, and a stat for `stats settings`.
    
    Finally, adds documentation and cleans up status outputs.
    
    Could use some automated tests but not make or break for release.
    dormando committed Jun 22, 2016
  5. @dormando

    allow manually specifying slab class sizes

    "-o slab_sizes=100-200-300-400-500" will create 5 slab classes of those
    specified sizes, with the final class being item_max_size.
    
    Using the new online stats sizes command, it's possible to determine if the
    typical factoral slab class growth rate doesn't align well with how items are
    stored.
    
    This is dangerous unless you really know what you're doing. If your items have
    an exact or very predictable size this makes a lot of sense. If they do not,
    the defaults are safer.
    dormando committed Jun 21, 2016
  6. @dormando

    online hang-free "stats sizes" command.

    "stats sizes" is one of the lack cache-hanging commands. With millions of
    items it can hang for many seconds.
    
    This commit changes the command to be dynamic. A histogram is tracked as items
    are linked and unlinked from the cache. The tracking is enabled or disabled at
    runtime via "stats sizes_enable" and "stats sizes_disable".
    
    This presently "works" but isn't accurate. Giving it some time to think over
    before switching to requiring that CAS be enabled. Otherwise the values could
    underflow if items are removed that existed before the sizes tracker is
    enabled. This attempts to work around it by using it->time, which gets updated
    on fetch, and is thus inaccurate.
    dormando committed Jun 21, 2016
  7. @dormando

    add -o watcher_logbuf_size=N worker_logbuf_size=N

    the defaults should just about always be used, but this is now tunable for
    completeness. Also handy for writing tests.
    
    This also hopefully makes the watcher.t test not flaky anymore.
    dormando committed Jun 23, 2016
  8. @dormando

    treat and print item flags as unsigned int

    most of the code would parse and handle flags as unsigned int, but passed into
    alloc functions as a signed int... which would then continue to print it as
    unsigned up until a change made in 2007. Now treat it fully as unsigned and
    print as unsigned.
    dormando committed Apr 28, 2014
Commits on Jun 22, 2016
  1. @dormando

    make watcher test less flaky.

    as usual, need a better way of doing this :/
    dormando committed Jun 21, 2016
  2. @elfchief @dormando
Commits on Jun 21, 2016
  1. @elfchief @dormando
  2. @dormando

    fix solaris compiler warning in bipbuffer.c

    "statement not reached".
    dormando committed Jun 20, 2016
  3. @dormando

    add #include <stdio.h> to fix error: implicit declaration of function…

    … ‘snprintf’
    Mathieu CARBONNEAUX committed with dormando Jun 18, 2016
Commits on Jun 17, 2016
  1. @dormando

    add protocol documentation

    and a note for missing information.
    dormando committed Jun 16, 2016
  2. @dormando

    misc cleanups for logger code.

    tests pass now.
    dormando committed Jun 16, 2016
  3. @dormando

    logger endpoints for first release

    swapping "RAWCMDS" for internal hooks on when items are fetched or stored.
    
    This doesn't map 1:1 with commands, ie: a store is internally a fetch then
    store, so two log lines are generated. An ascii multiget one make one log line
    per key fetched.
    
    It's a good place to start. Need to come back and refactor parts of logger.c
    again, then convert all prints in the codebase to log entries.
    dormando committed Jun 16, 2016
  4. @dormando

    convert eviction log to new process

    add LOGGER_LOG() macro wrapper for callers.
    
    eviction logging is now using the "more final" method, where data is copied
    into structs embedded into the per-worker circular buffer. This moves the
    expensive snprintf calls to the background thread, and also allows making the
    logging format switchable.
    
    also switched the format to key=value. it's still largely readable but much
    easier to parse.
    dormando committed Jun 16, 2016
  5. @dormando

    logger: add a uri encoder for printing keys

    makes a map on start of bgthread to speed up conversion a little.
    dormando committed Jun 15, 2016
  6. @dormando

    small logger code clarity improvements

    put header sections for utils/bgthread/api, edit function names slightly so
    it's clear what's only called from the bgthread.
    
    remaining FIXME/TODO's appear noncritical. might do those in the future.
    dormando committed Jun 13, 2016
  7. @dormando

    some global stats for bg logger

    four obvious ones. have a handy place to do the summarization when the logger
    wakes up for its run, avoiding the locks.
    dormando committed Jun 12, 2016
  8. @dormando
  9. @dormando

    improve 'watch' command processing a little

    moves to its own function, respods "OK\r\n" to client, allows multiple
    arguments for multiple flags. Needs more thought before adding sampling.
    dormando committed Jun 12, 2016
  10. @dormando

    poll() smarter when full, print skipped count

    When lines are skipped to a watcher, a [skipped: n] is printed before
    resuming. Also polls full watcher directly once, and will wait until the
    outer loop to re-poll.
    
    Think the routine can be simplified... it works so will leave it and revisit
    later.
    dormando committed Jun 12, 2016
  11. @dormando

    use one bipbuffer per watcher. remove iovec code.

    after the previous commit's exercise, this greatly simplifies the writing
    process. The buffers are large but can be tuned with performance testing.
    
    Lines are now rendered into scratch space, and if event flags (eflags) match
    for a watcher, copy the bytes into that watcher's specific buffer.
    
    In most realistic cases, watchers will be watching different streams of
    information. While this does require a minimum of one memcpy instead of
    directly writing into the bipbuf as before, it removes all of the loops and
    management of iovecs required for filtering events on the write-to-socket end.
    dormando committed Jun 12, 2016
  12. @dormando

    remove "logger chunks", add individualized streams

    Stop doing a multi-reader circular buffer structure on top of a circular
    buffer. Also adds individualized streams based off of the central buffer.
    
    Sadly this requires managing iovecs and dealing with partial writes into said
    iovecs. That makes things very complicated. Since it's not clear to me how to
    simplify it too much (as of this writing), one of the next commits should
    remove iovecs and instead give each watcher its own circular buffer. The
    parser thread will copy watched events into each buffer.
    
    The above would only be slower for the case of many watchers watching the same
    event streams. Given all of the extra loops required for managing the iovecs,
    and the more complicated syscall handling, it might even be the same speed to
    manage multiple buffers anyway.
    
    I completed this intermediary change since it simplifies the surrounding code
    and was educational to fiddle with iovecs again.
    dormando committed Jun 11, 2016
  13. @dormando

    switch from bit fields to bit manipulation

    can't compare bit fields en-masse, which makes things too difficult.
    dormando committed Jun 10, 2016
  14. @dormando

    manage logger watcher flags.

    very temporary user control. allows to watch either fetchers or evictions, but
    not both, and always with timestamps.
    dormando committed Nov 25, 2015
  15. @dormando

    initial logger code.

    Logs are written to per-thread buffers. A new background thread aggregates the
    logs, further processes them, then writes them to any "watchers".
    
    Logs can have the time added to them, and all have a GID so they can be put
    back into strict order.
    
    This is an early preview. Code needs refactoring and a more complete set of
    options. All watchers are also stuck viewing the global feed of logs, even if
    they asked for different data.
    
    As of this commit there's no way to toggle the "stderr" watcher.
    dormando committed Nov 18, 2015
  16. @dormando

    add "-o modern" option for easy default updates

    I've been recommending people use a long string of arguments as the canonical
    way of starting memcached. This boils it down to a single argument that should
    automatically pick up new stuff in the future as well.
    
    These defaults will become the real defaults at some point, so I hope folks
    are trying it out.
    dormando committed Jun 16, 2016
Commits on Jun 5, 2016
  1. @dormando

    bump some global stats to 64bit uints

    total_items is pretty easy to overflow. Upped some of the others just in case.
    dormando committed May 31, 2016
Commits on May 30, 2016
  1. @biwing @dormando
  2. @biwing @dormando

    fix typo of comments in cache.h

    biwing committed with dormando May 1, 2016
  3. @dormando

    Fix typo of pid path

    hiracy committed with dormando Apr 6, 2016
  4. @fowles @dormando

    Add braces around APPEND_NUM_FMT_STAT conditional

    APPEND_NUM_FMT_STAT is a macro that expands to multiple statements, so it must have braces when used in a conditional.
    fowles committed with dormando Apr 5, 2016
  5. @meteorgan @dormando

    fix typo in cas.t

    meteorgan committed with dormando Mar 16, 2016
Something went wrong with that request. Please try again.