redict/tests
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
..
assets Fix test "server is up" detection after logging changes. 2016-12-19 16:49:58 +01:00
cluster cluster.tcl: Add master consecutively down test. 2018-06-30 09:29:35 +08:00
helpers Test: fix blocking lists/zsets replication test. 2018-05-15 17:43:41 +02:00
integration Fix typo 2018-07-03 18:19:46 +02:00
sentinel Sentinel: test command renaming feature. 2018-06-26 16:08:43 +02:00
support Test: fix lshuffle by providing the "K" combinator. 2018-07-13 17:52:39 +02:00
tmp minor fixes to the new test suite, html doc updated 2010-05-14 18:48:33 +02:00
unit slave buffers were wasteful and incorrectly counted causing eviction 2018-07-16 16:43:42 +03:00
instances.tcl Correct spelling of "faield". 2017-08-12 22:21:03 -07:00
test_helper.tcl Merge branch 'unstable' into pending-querybuf 2018-07-03 10:07:26 +08:00