1. 18 Jul, 2018 1 commit
    • Oran Agra's avatar
      make active defrag test more stable · f89c93c8
      Oran Agra authored
      on slower machines, the active defrag test tended to fail.
      although the fragmentation ratio was below the treshold, the defragger was
      still in the middle of a scan cycle.
      
      this commit changes:
      - the defragger uses the current fragmentation state, rather than the cache one
        that is updated by server cron every 100ms. this actually fixes a bug of
        starting one excess scan cycle
      - the test lets the defragger use more CPU cycles, in hope that the defrag
        will be faster, but also give it more time before we give up.
      f89c93c8
  2. 16 Jul, 2018 1 commit
    • Oran Agra's avatar
      slave buffers were wasteful and incorrectly counted causing eviction · bf680b6f
      Oran Agra authored
      A) slave buffers didn't count internal fragmentation and sds unused space,
         this caused them to induce eviction although we didn't mean for it.
      
      B) slave buffers were consuming about twice the memory of what they actually needed.
      - this was mainly due to sdsMakeRoomFor growing to twice as much as needed each time
        but networking.c not storing more than 16k (partially fixed recently in 237a38737).
      - besides it wasn't able to store half of the new string into one buffer and the
        other half into the next (so the above mentioned fix helped mainly for small items).
      - lastly, the sds buffers had up to 30% internal fragmentation that was wasted,
        consumed but not used.
      
      C) inefficient performance due to starting from a small string and reallocing many times.
      
      what i changed:
      - creating dedicated buffers for reply list, counting their size with zmalloc_size
      - when creating a new reply node from, preallocate it to at least 16k.
      - when appending a new reply to the buffer, first fill all the unused space of the
        previous node before starting a new one.
      
      other changes:
      - expose mem_not_counted_for_evict info field for the benefit of the test suite
      - add a test to make sure slave buffers are counted correctly and that they don't cause eviction
      bf680b6f
  3. 13 Jul, 2018 4 commits
  4. 12 Jul, 2018 1 commit
  5. 03 Jul, 2018 1 commit
  6. 01 Jul, 2018 1 commit
  7. 27 Jun, 2018 2 commits
  8. 21 Jun, 2018 1 commit
  9. 20 Jun, 2018 1 commit
    • Guy Benoish's avatar
      Enhance RESTORE with RDBv9 new features · b5197f1f
      Guy Benoish authored
      RESTORE now supports:
      1. Setting LRU/LFU
      2. Absolute-time TTL
      
      Other related changes:
      1. RDB loading will not override LRU bits when RDB file
         does not contain the LRU opcode.
      2. RDB loading will not set LRU/LFU bits if the server's
         maxmemory-policy does not match.
      b5197f1f
  10. 14 Jun, 2018 1 commit
  11. 12 Jun, 2018 4 commits
  12. 11 Jun, 2018 2 commits
  13. 05 Jun, 2018 2 commits
  14. 25 May, 2018 1 commit
  15. 24 May, 2018 1 commit
  16. 17 May, 2018 1 commit
    • Oran Agra's avatar
      Active defrag fixes for 32bit builds · ad133e10
      Oran Agra authored
      problems fixed:
      * failing to read fragmentation information from jemalloc
      * overflow in jemalloc fragmentation hint to the defragger
      * test suite not triggering eviction after population
      ad133e10
  17. 11 May, 2018 2 commits
  18. 29 Apr, 2018 1 commit
  19. 25 Mar, 2018 1 commit
  20. 15 Mar, 2018 5 commits
  21. 12 Mar, 2018 1 commit
    • Oran Agra's avatar
      Adding real allocator fragmentation to INFO and MEMORY command + active defrag test · 806736cd
      Oran Agra authored
      other fixes / improvements:
      - LUA script memory isn't taken from zmalloc (taken from libc malloc)
        so it can cause high fragmentation ratio to be displayed (which is false)
      - there was a problem with "fragmentation" info being calculated from
        RSS and used_memory sampled at different times (now sampling them together)
      
      other details:
      - adding a few more allocator info fields to INFO and MEMORY commands
      - improve defrag test to measure defrag latency of big keys
      - increasing the accuracy of the defrag test (by looking at real grag info)
        this way we can use an even lower threshold and still avoid false positives
      - keep the old (total) "fragmentation" field unchanged, but add new ones for spcific things
      - add these the MEMORY DOCTOR command
      - deduct LUA memory from the rss in case of non jemalloc allocator (one for which we don't "allocator active/used")
      - reduce sampling rate of the rss and allocator info
      806736cd
  22. 09 Jan, 2018 1 commit
  23. 01 Dec, 2017 4 commits
    • antirez's avatar
      Streams: add some initial test for XREVRANGE. · 45fe1f5e
      antirez authored
      45fe1f5e
    • antirez's avatar
      Streams: fix XREAD test broken after previous tests improvements. · 1898c505
      antirez authored
      10% of times the data is not just "item 0" but there is also the
      "otherfield" part. Use [lrange] to avoid the issue.
      This commit fixes #4416.
      1898c505
    • antirez's avatar
      Streams: move ID ms/seq separator from '.' to '-' · 5082ec64
      antirez authored
      After checking with the community via Twitter (here:
      https://twitter.com/antirez/status/915130876861788161) the verdict was to
      use ":". However I later realized, after users lamented the fact that
      it's hard to copy IDs just with double click, that this was the reason
      why I moved to "." in the first instance. Fortunately "-", that was the
      other option with most votes, also gets selected with double click on
      most terminal applications on Linux and MacOS.
      
      So my reasoning was:
      
      1) We can't retain "." because it's actually confusing to newcomers, it
      looks like a floating number, people may be tricked into thinking they
      can order IDs numerically as floats.
      
      2) Moving to a double-click-to-select format is much better. People will
      work with such IDs for long time when coding / debugging. Why making now
      a choice that will impact this for the next years?
      
      The only other viable option was "-", and that's what I did. Thanks.
      5082ec64
    • antirez's avatar
      Streams: add XADD + MAXLEN test. · e53c9030
      antirez authored
      e53c9030