1. 24 Jul, 2018 1 commit
  2. 23 Jul, 2018 5 commits
    • antirez's avatar
      Change 42 to 1000 as warning level for cached scripts. · 2c07c107
      antirez authored
      Related to #4883.
      2c07c107
    • Itamar Haber's avatar
    • Itamar Haber's avatar
      Adds memory information about the script's cache to INFO · faf3dbfc
      Itamar Haber authored
      Implementation notes: as INFO is "already broken", I didn't want to break it further. Instead of computing the server.lua_script dict size on every call, I'm keeping a running sum of the body's length and dict overheads.
      
      This implementation is naive as it **does not** take into consideration dict rehashing, but that inaccuracy pays off in speed ;)
      
      Demo time:
      
      ```bash
      $ redis-cli info memory | grep "script"
      used_memory_scripts:96
      used_memory_scripts_human:96B
      number_of_cached_scripts:0
      $ redis-cli eval "" 0 ; redis-cli info memory | grep "script"
      (nil)
      used_memory_scripts:120
      used_memory_scripts_human:120B
      number_of_cached_scripts:1
      $ redis-cli script flush ; redis-cli info memory | grep "script"
      OK
      used_memory_scripts:96
      used_memory_scripts_human:96B
      number_of_cached_scripts:0
      $ redis-cli eval "return('Hello, Script Cache :)')" 0 ; redis-cli info memory | grep "script"
      "Hello, Script Cache :)"
      used_memory_scripts:152
      used_memory_scripts_human:152B
      number_of_cached_scripts:1
      $ redis-cli eval "return redis.sha1hex(\"return('Hello, Script Cache :)')\")" 0 ; redis-cli info memory | grep "script"
      "1be72729d43da5114929c1260a749073732dc822"
      used_memory_scripts:232
      used_memory_scripts_human:232B
      number_of_cached_scripts:2
       19:03:54 redis [lua_scripts-in-info-memory L ✚…⚑] $ redis-cli evalsha 1be72729d43da5114929c1260a749073732dc822 0
      "Hello, Script Cache :)"
      ```
      faf3dbfc
    • antirez's avatar
      Fix merge errors. · 49841a54
      antirez authored
      For some reason I made a merge fiasco between 5.0 and unstable.
      This fixes the error introduced by merging unstable.
      49841a54
    • antirez's avatar
      Merge branch 'unstable' into 5.0 branch · 77a7ec72
      antirez authored
      77a7ec72
  3. 20 Jul, 2018 2 commits
  4. 19 Jul, 2018 9 commits
  5. 18 Jul, 2018 5 commits
  6. 17 Jul, 2018 11 commits
  7. 16 Jul, 2018 7 commits
    • Salvatore Sanfilippo's avatar
      Merge pull request #5113 from 0xtonyxia/using-compare-func-instead · 9fbd49bb
      Salvatore Sanfilippo authored
      Streams: using streamCompareID() instead of direct compare.
      9fbd49bb
    • Salvatore Sanfilippo's avatar
      Merge pull request #5127 from oranagra/sds_req_type · cab39676
      Salvatore Sanfilippo authored
      bugfix in sdsReqType creating 64bit sds headers on 32bit systems
      cab39676
    • antirez's avatar
      Hopefully improve commenting of #5126. · f9c84d6d
      antirez authored
      Reading the PR gave me the opportunity to better specify what the code
      was doing in places where I was not immediately sure about what was
      going on. Moreover I documented the structure in server.h so that people
      reading the header file will immediately understand what the structure
      is useful for.
      f9c84d6d
    • Salvatore Sanfilippo's avatar
      Merge pull request #5126 from oranagra/slave_buf_memory_2 · e22a1218
      Salvatore Sanfilippo authored
      slave buffers were wasteful and incorrectly counted causing eviction
      e22a1218
    • Salvatore Sanfilippo's avatar
      Merge pull request #5132 from soloestoy/propagate-xdel-correctly · 28dd8dd1
      Salvatore Sanfilippo authored
      Streams: correctly propagate xdel if needed
      28dd8dd1
    • 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
    • zhaozhao.zz's avatar
      Streams: correctly propagate xdel if needed · 73306c6f
      zhaozhao.zz authored
      73306c6f