1. 14 May, 2012 1 commit
    • antirez's avatar
      Redis timer interrupt frequency configurable as REDIS_HZ. · f7f2b261
      antirez authored
      Redis uses a function called serverCron() that is very similar to the
      timer interrupt of an operating system. This function is used to handle
      a number of asynchronous things, like active expired keys collection,
      clients timeouts, update of statistics, things related to the cluster
      and replication, triggering of BGSAVE and AOF rewrite process, and so
      forth.
      
      In the past the timer was called 1 time per second. At some point it was
      raised to 10 times per second, but it still was fixed and could not be
      changed even at compile time, because different functions called from
      serverCron() assumed a given fixed frequency.
      
      This commmit makes the frequency configurable, so that it is simpler to
      pick a good tradeoff between overhead of this function (that is usually
      very small) and the responsiveness of Redis during a few critical
      circumstances where a lot of work is done inside the timer.
      
      An example of such a critical condition is mass-expire of a lot of keys
      in the same second. Up to a given percentage of CPU time is used to
      perform expired keys collection per expire cylce. Now changing the
      REDIS_HZ macro it is possible to do less work but more times per second
      in order to block the server for less time.
      
      If this patch will work well in our tests it will enter Redis 2.6-final.
      f7f2b261
  2. 12 May, 2012 5 commits
  3. 09 May, 2012 2 commits
  4. 06 May, 2012 1 commit
  5. 05 May, 2012 1 commit
    • Pieter Noordhuis's avatar
      Compare integers in ziplist regardless of encoding · 0ef88927
      Pieter Noordhuis authored
      Because of the introduction of new integer encoding types for ziplists
      in the 2.6 tree, the same integer value may have a different encoding in
      different versions of the ziplist implementation. This means that the
      encoding can NOT be used as a fast path in comparing integers.
      0ef88927
  6. 02 May, 2012 4 commits
  7. 30 Apr, 2012 1 commit
    • Pieter Noordhuis's avatar
      Use safe dictionary iterator from KEYS · 9311d2b5
      Pieter Noordhuis authored
      Every matched key in a KEYS call is checked for expiration. When the key
      is set to expire, the call to `getExpire` will assert that the key also
      exists in the main dictionary. This in turn causes a rehashing step to
      be executed. Rehashing a dictionary when there is an iterator active may
      result in the iterator emitting duplicate entries, or not emitting some
      entries at all. By using a safe iterator, the rehash step is omitted.
      9311d2b5
  8. 27 Apr, 2012 9 commits
  9. 24 Apr, 2012 9 commits
  10. 21 Apr, 2012 2 commits
    • antirez's avatar
      Even inside #if 0 comments are comments. · e337b260
      antirez authored
      e337b260
    • antirez's avatar
      Limit memory used by big SLOWLOG entries. · 590d55a2
      antirez authored
      Two limits are added:
      
      1) Up to SLOWLOG_ENTRY_MAX_ARGV arguments are logged.
      2) Up to SLOWLOG_ENTRY_MAX_STRING bytes per argument are logged.
      3) slowlog-max-len is set to 128 by default (was 1024).
      
      The number of remaining arguments / bytes is logged in the entry
      so that the user can understand better the nature of the logged command.
      590d55a2
  11. 19 Apr, 2012 1 commit
  12. 18 Apr, 2012 4 commits