1. 28 10月, 2013 1 次提交
  2. 25 10月, 2013 2 次提交
  3. 09 10月, 2013 2 次提交
  4. 26 9月, 2013 1 次提交
  5. 17 9月, 2013 1 次提交
  6. 27 8月, 2013 1 次提交
  7. 22 8月, 2013 2 次提交
  8. 21 8月, 2013 1 次提交
  9. 06 8月, 2013 4 次提交
    • A
      Add per-db average TTL information in INFO output. · 112fa479
      antirez 提交于
      Example:
      
      db0:keys=221913,expires=221913,avg_ttl=655
      
      The algorithm uses a running average with only two samples (current and
      previous). Keys found to be expired are considered at TTL zero even if
      the actual TTL can be negative.
      
      The TTL is reported in milliseconds.
      112fa479
    • A
      activeExpireCycle(): fix about fast cycle early start. · 4befe73b
      antirez 提交于
      We don't want to repeat a fast cycle too soon, the previous code was
      broken, we need to wait two times the period *since* the start of the
      previous cycle in order to avoid there is an even space between cycles:
      
      .-> start                   .-> second start
      |                           |
      +-------------+-------------+--------------+
      | first cycle |    pause    | second cycle |
      +-------------+-------------+--------------+
      
      The second and first start must be PERIOD*2 useconds apart hence the *2
      in the new code.
      4befe73b
    • A
      Some activeExpireCycle() refactoring. · 6500fabf
      antirez 提交于
      6500fabf
    • A
      Remove dead code and fix comments for new expire code. · d398f388
      antirez 提交于
      d398f388
  10. 05 8月, 2013 2 次提交
    • A
      Darft #2 for key collection algo: more improvements. · 66a26471
      antirez 提交于
      This commit makes the fast collection cycle time configurable, at
      the same time it does not allow to run a new fast collection cycle
      for the same amount of time as the max duration of the fast
      collection cycle.
      66a26471
    • A
      Draft #1 of a new expired keys collection algorithm. · b09ea1bd
      antirez 提交于
      The main idea here is that when we are no longer to expire keys at the
      rate the are created, we can't block more in the normal expire cycle as
      this would result in too big latency spikes.
      
      For this reason the commit introduces a "fast" expire cycle that does
      not run for more than 1 millisecond but is called in the beforeSleep()
      hook of the event loop, so much more often, and with a frequency bound
      to the frequency of executed commnads.
      
      The fast expire cycle is only called when the standard expiration
      algorithm runs out of time, that is, consumed more than
      REDIS_EXPIRELOOKUPS_TIME_PERC of CPU in a given cycle without being able
      to take the number of already expired keys that are yet not collected
      to a number smaller than 25% of the number of keys.
      
      You can test this commit with different loads, but a simple way is to
      use the following:
      
      Extreme load with pipelining:
      
      redis-benchmark -r 100000000 -n 100000000  \
              -P 32 set ele:rand:000000000000 foo ex 2
      
      Remove the -P32 in order to avoid the pipelining for a more real-world
      load.
      
      In another terminal tab you can monitor the Redis behavior with:
      
      redis-cli -i 0.1 -r -1 info keyspace
      
      and
      
      redis-cli --latency-history
      
      Note: this commit will make Redis printing a lot of debug messages, it
      is not a good idea to use it in production.
      b09ea1bd
  11. 25 7月, 2013 2 次提交
  12. 24 7月, 2013 1 次提交
  13. 22 7月, 2013 1 次提交
    • A
      Introduction of a new string encoding: EMBSTR · 894eba07
      antirez 提交于
      Previously two string encodings were used for string objects:
      
      1) REDIS_ENCODING_RAW: a string object with obj->ptr pointing to an sds
      stirng.
      
      2) REDIS_ENCODING_INT: a string object where the obj->ptr void pointer
      is casted to a long.
      
      This commit introduces a experimental new encoding called
      REDIS_ENCODING_EMBSTR that implements an object represented by an sds
      string that is not modifiable but allocated in the same memory chunk as
      the robj structure itself.
      
      The chunk looks like the following:
      
      +--------------+-----------+------------+--------+----+
      | robj data... | robj->ptr | sds header | string | \0 |
      +--------------+-----+-----+------------+--------+----+
                           |                       ^
                           +-----------------------+
      
      The robj->ptr points to the contiguous sds string data, so the object
      can be manipulated with the same functions used to manipulate plan
      string objects, however we need just on malloc and one free in order to
      allocate or release this kind of objects. Moreover it has better cache
      locality.
      
      This new allocation strategy should benefit both the memory usage and
      the performances. A performance gain between 60 and 70% was observed
      during micro-benchmarks, however there is more work to do to evaluate
      the performance impact and the memory usage behavior.
      894eba07
  14. 16 7月, 2013 1 次提交
  15. 12 7月, 2013 1 次提交
  16. 09 7月, 2013 2 次提交
  17. 08 7月, 2013 4 次提交
  18. 05 7月, 2013 2 次提交
  19. 02 7月, 2013 1 次提交
  20. 28 6月, 2013 1 次提交
  21. 27 6月, 2013 1 次提交
  22. 25 6月, 2013 2 次提交
  23. 24 6月, 2013 1 次提交
    • A
      Replication of scripts as EVALSHA: sha1 caching implemented. · 94ec7db4
      antirez 提交于
      This code is only responsible to take an LRU-evicted fixed length cache
      of SHA1 that we are sure all the slaves received.
      
      In this commit only the implementation is provided, but the Redis core
      does not use it to actually send EVALSHA to slaves when possible.
      94ec7db4
  24. 21 6月, 2013 1 次提交
    • A
      New API to force propagation. · 515a26bb
      antirez 提交于
      The old REDIS_CMD_FORCE_REPLICATION flag was removed from the
      implementation of Redis, now there is a new API to force specific
      executions of a command to be propagated to AOF / Replication link:
      
          void forceCommandPropagation(int flags);
      
      The new API is also compatible with Lua scripting, so a script that will
      execute commands that are forced to be propagated, will also be
      propagated itself accordingly even if no change to data is operated.
      
      As a side effect, this new design fixes the issue with scripts not able
      to propagate PUBLISH to slaves (issue #873).
      515a26bb
  25. 20 6月, 2013 1 次提交
    • A
      PUBSUB command implemented. · 455563fa
      antirez 提交于
      Currently it implements three subcommands:
      
      PUBSUB CHANNELS [<pattern>]    List channels with non-zero subscribers.
      PUBSUB NUMSUB [channel_1 ...]  List number of subscribers for channels.
      PUBSUB NUMPAT                  Return number of subscribed patterns.
      455563fa
  26. 30 5月, 2013 1 次提交
    • A
      New INFO field "min_slaves_good_slaves". · 88441bf1
      antirez 提交于
      When min-slaves-to-write feature is active, this field reports the
      number of slaves considered good (online state, lag within the specified
      range).
      88441bf1