redict/tests/unit
Oran Agra bf680b6f8c slave buffers were wasteful and incorrectly counted causing eviction
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
2018-07-16 16:43:42 +03:00
..
type Test: XDEL fuzz testing. Remove and check stage. 2018-07-13 17:58:17 +02:00
aofrw.tcl AOF: run tests with preamble off when it makes sense. 2018-03-25 13:03:38 +02:00
auth.tcl Remove trailing spaces from tests 2014-09-29 06:49:08 -04:00
bitfield.tcl Test: regression test for #3564 added. 2016-10-31 15:46:58 +01:00
bitops.tcl Regression test for #3282. 2016-06-15 11:49:49 +02:00
dump.tcl Fix typo 2018-07-03 18:19:46 +02:00
expire.tcl fix typo 2018-06-21 22:08:09 +08:00
geo.tcl Fix GEORADIUS edge case with huge radius. 2017-07-03 19:38:31 +02:00
hyperloglog.tcl Test: improve PFCOUNT with multiple keys testing. 2015-11-03 19:03:17 +01:00
introspection-2.tcl Test TOUCH and new TTL / TYPE behavior about object access time. 2016-06-15 17:15:51 +02:00
introspection.tcl Fix race condition in unit/introspection 2015-08-11 22:56:17 -07:00
keyspace.tcl Test: MOVE expire test improved. 2015-09-14 12:35:55 +02:00
latency-monitor.tcl Test: regression test for latency expire events logging bug. 2017-11-24 18:33:31 +01:00
lazyfree.tcl Test: basic lazyfree unit test. 2015-10-09 09:47:17 +02:00
limits.tcl More robust maxclients test. 2012-04-18 11:34:18 +02:00
maxmemory.tcl slave buffers were wasteful and incorrectly counted causing eviction 2018-07-16 16:43:42 +03:00
memefficiency.tcl minor fix in creating a stream NACK for rdb and defrag tests 2018-06-27 15:34:17 +03:00
multi.tcl Test: test replication of MULTI/EXEC. 2013-03-27 11:44:50 +01:00
obuf-limits.tcl Test: obuf-limits test false positive removed. 2013-03-25 11:56:34 +01:00
other.tcl AOF: run tests with preamble off when it makes sense. 2018-03-25 13:03:38 +02:00
pendingquerybuf.tcl limit the size of pending-querybuf in masterclient 2018-07-01 14:43:53 +08:00
printver.tcl Print version info before running the test 2011-05-20 11:44:54 +02:00
protocol.tcl Return proper error on requests with an unbalanced number of quotes. 2013-12-08 12:58:12 +02:00
pubsub.tcl pubsub: Return integers for NUMSUB, not strings 2014-08-08 11:19:37 +02:00
quit.tcl Add tests for OK on QUIT 2010-10-15 12:54:53 +02:00
scan.tcl Fix SCAN bug regression test, avoiding empty SREM call. 2018-06-14 12:21:58 +02:00
scripting.tcl Fix typo 2018-07-03 18:19:46 +02:00
slowlog.tcl Add test in slowlog.tcl 2018-07-13 17:51:06 +08:00
sort.tcl Config: Add quicklist, remove old list options 2015-01-02 11:16:10 -05:00
wait.tcl Test: WAIT tests added in wait.tcl unit. 2016-11-18 13:10:29 +01:00