Commit Graph

178 Commits

Author SHA1 Message Date
0f1969f16f trim the double implementation of jemalloc purge 2019-10-04 14:22:13 +03:00
a1a65d238c Fix compilation error 2019-09-20 01:11:20 -07:00
1b3cb3b0de RESP3: Use verbatim in MEMORY subcommands. 2019-09-18 18:48:14 +02:00
2a8a63af44 Make EMBSTR case of #6261 more obvious. 2019-07-31 12:03:10 +02:00
f899c31fbc Merge pull request #6261 from chendq8/robj
make memory usage consistent of robj with OBJ_ENCODING_INT
2019-07-31 11:54:11 +02:00
004c26ec28 make memory usage consistent of robj with OBJ_ENCODING_INT 2019-07-22 17:45:30 +08:00
41c5ebcab6 missing per-skiplist overheads in MEMORY USAGE
these had severe impact for small zsets, for instance ones with just one
element that is longer than 64 (causing it not to be ziplist encoded)
2019-07-04 15:20:49 +03:00
052e03495f Fix objectSetLRUOrLFU() when LFU underflows. 2019-03-14 17:06:59 +01:00
d292a51618 Improve comments after merging #5834. 2019-03-14 12:47:36 +01:00
bdd9a8002a Trim SDS free space of retained module strings
In some cases processMultibulkBuffer uses sdsMakeRoomFor to
expand the querybuf, but later in some cases it uses that query
buffer as is for an argv element (see "Optimization"), which means
that the sds in argv may have a lot of wasted space, and then in case
modules keep that argv RedisString inside their data structure, this
space waste will remain for long (until restarted from rdb).
2019-02-12 14:21:21 +01:00
317f8b9d38 RESP3: most null replies converted. 2019-01-09 17:00:29 +01:00
fe67418ba4 RESP3: Use new deferred len API in object.c. 2019-01-09 17:00:29 +01:00
d56c631343 MEMORY command: make USAGE more accurate
In MEMORY USAGE command, we count the key argv[2] into usage,
but the argument in command may contains free spaces because of
sdsMakeRoomFor. But the key in db never contains free spaces
because we use sdsdup when dbAdd, so using the real key to
count the usage is more accurate.
2018-11-29 01:01:51 +08:00
560cdf359f MEMORY command: make strcasecmp() conditional like the following. 2018-11-06 18:15:51 +01:00
249cd9381d Merge pull request #4526 from itamarhaber/memory_help
Standardizes `MEMORY HELP` subcommand
2018-11-06 18:13:17 +01:00
a2131f907a Merge pull request #5453 from damz/pr/aof-buffer-evict
Overhead is the allocated size of the AOF buffer, not its length
2018-10-24 12:28:28 +02:00
29e488cbb0 Overhead is the allocated size of the AOF buffer, not its length 2018-10-16 11:47:42 -07:00
297950e8b8 several typos fixed, optimize MSETNX to avoid unnecessary loop 2018-10-16 15:48:03 +08:00
e19a06d2dd Merge pull request #5242 from oranagra/script_mem
script cache memory in INFO and MEMORY includes both script code and overheads
2018-10-02 16:03:05 +02:00
0c1d28e2d0 Slave removal: remove slave from object.c. 2018-09-11 15:32:28 +02:00
f4b27ae222 script cache memory in INFO and MEMORY includes both script code and overheads 2018-08-13 17:36:54 +03:00
9a375e5408 Change 42 to 1000 as warning level for cached scripts.
Related to #4883.
2018-07-23 18:44:58 +02:00
445a2a2b1b Merge pull request #4883 from itamarhaber/lua_scripts-in-info-memory
Adds memory information about the scripts' cache to INFO
2018-07-23 18:43:05 +02:00
993716c351 Adds Lua overheads to MEMORY STATS, smartens the MEMORY DOCTOR 2018-07-22 21:16:00 +03:00
2edcafb35d addReplySubSyntaxError() renamed to addReplySubcommandSyntaxError(). 2018-07-02 18:49:34 +02:00
bc6a004588 Merge pull request #4998 from itamarhaber/module_command_help
Module command help
2018-07-02 18:46:56 +02:00
a16aa03a67 Merge pull request #5051 from oranagra/streams_mem_estimate
fix streams memory estimation, missing raxSeek
2018-06-21 17:36:28 +02:00
20e10dc7b8 fix streams memory estimation, missing raxSeek 2018-06-21 17:58:29 +03:00
b5197f1fc9 Enhance RESTORE with RDBv9 new features
RESTORE now supports:
1. Setting LRU/LFU
2. Absolute-time TTL

Other related changes:
1. RDB loading will not override LRU bits when RDB file
   does not contain the LRU opcode.
2. RDB loading will not set LRU/LFU bits if the server's
   maxmemory-policy does not match.
2018-06-20 15:11:08 +07:00
bd92389c2d Refactor createObjectFromLongLong() to be suitable for value objects. 2018-06-18 16:55:16 +02:00
c199280edb Globally applies addReplySubSyntaxError 2018-06-07 18:39:36 +03:00
5bf08449f9 Merge pull request #4953 from soloestoy/fix-memory-overhead
MEMORY: fix the missing of monitor clients buffers
2018-05-31 17:31:24 +02:00
2f963080c1 Capitalize OBJECT HELP subcommands. 2018-05-31 17:11:46 +02:00
ce2e0c02fc MEMORY: fix the missing of monitor clients buffers 2018-05-27 16:34:58 +08:00
e08d6bb37e Merge pull request #4703 from gechunlin/unstable
Update object.c
2018-03-22 16:32:45 +01:00
da621783f0 Merge pull request #4691 from oranagra/active_defrag_v2
Active defrag v2
2018-03-22 09:16:32 +01:00
0f2c6b6a18 Streams: improve MEMORY USAGE computation, include CGs. 2018-03-20 17:50:40 +01:00
806736cdf9 Adding real allocator fragmentation to INFO and MEMORY command + active defrag test
other fixes / improvements:
- LUA script memory isn't taken from zmalloc (taken from libc malloc)
  so it can cause high fragmentation ratio to be displayed (which is false)
- there was a problem with "fragmentation" info being calculated from
  RSS and used_memory sampled at different times (now sampling them together)

other details:
- adding a few more allocator info fields to INFO and MEMORY commands
- improve defrag test to measure defrag latency of big keys
- increasing the accuracy of the defrag test (by looking at real grag info)
  this way we can use an even lower threshold and still avoid false positives
- keep the old (total) "fragmentation" field unchanged, but add new ones for spcific things
- add these the MEMORY DOCTOR command
- deduct LUA memory from the rss in case of non jemalloc allocator (one for which we don't "allocator active/used")
- reduce sampling rate of the rss and allocator info
2018-03-12 15:08:52 +02:00
d8830200b4 Merge pull request #3828 from oranagra/sdsnewlen_pr
add SDS_NOINIT option to sdsnewlen to avoid unnecessary memsets.
2018-02-27 04:04:32 -08:00
d4e6d1086f Update object.c 2018-02-22 20:57:54 -06:00
f9e6c2046f Merge pull request #3745 from guybe7/unstable
enlarged buffer given to ld2string
2018-02-13 15:50:21 +01:00
5113a53df6 Fix memory usage list bug 2018-01-05 12:16:24 +08:00
d49bfc4080 Uppercases subcommands in OBJECT HELP 2017-12-15 21:21:12 +02:00
7820377d00 Uppercases subcommands in MEMORY HELP 2017-12-15 21:19:41 +02:00
4317e2131f Standardizes MEMORY HELP subcommand 2017-12-10 17:54:56 +02:00
522760fac7 Change indentation and other minor details of PR #4489.
The main change introduced by this commit is pretending that help
arrays are more text than code, thus indenting them at level 0. This
improves readability, and is an old practice when defining arrays of
C strings describing text.

Additionally a few useless return statements are removed, and the HELP
subcommand capitalized when printed to the user.
2017-12-06 12:05:14 +01:00
8b51121998 Merge remote-tracking branch 'upstream/unstable' into help_subcommands 2017-12-05 18:14:59 +02:00
f42df6f43a Streams: add code to compute the stream memory usage.
It's a bit of black magic without actually tracking it inside rax.c,
however Redis usage of the radix tree for the stream data structure is
quite consistent, so a few magic constants apparently are producing
results that make sense.
2017-12-01 12:50:27 +01:00
439120c620 Streams: implement stream object release. 2017-12-01 10:24:24 +01:00
79866a6361 Streams: 12 commits squashed into the initial Streams implementation. 2017-12-01 10:24:24 +01:00