- 06 Dec, 2020 1 commit
-
-
Oran Agra authored
When RDB input attempts to make a huge memory allocation that fails, RESTORE should fail gracefully rather than die with panic
-
- 02 Oct, 2020 1 commit
-
-
Oran Agra authored
This commit has two aspects: 1) improve memory reporting for all the places that use sdsAllocSize to compute memory used by a string, in this case it'll include the internal fragmentation. 2) reduce the need for realloc calls by making the sds implicitly take over the internal fragmentation of the block it allocated.
-
- 02 Dec, 2019 1 commit
-
-
antirez authored
-
- 15 Sep, 2019 1 commit
-
-
David Carlier authored
-
- 02 Jun, 2019 1 commit
-
-
Oran Agra authored
jemalloc 5 doesn't immediately release memory back to the OS, instead there's a decaying mechanism, which doesn't work when there's no traffic (no allocations). this is most evident if there's no traffic after flushdb, the RSS will remain high. 1) enable jemalloc background purging 2) explicitly purge in flushdb
-
- 30 Sep, 2018 1 commit
-
-
Bruce Merry authored
When HAVE_MALLOC_SIZE is false, each call to zrealloc causes used_memory to increase by PREFIX_SIZE more than it should, due to mis-matched accounting between the original zmalloc (which includes PREFIX size in its increment) and zrealloc (which misses it from its decrement). I've also supplied a command-line test to easily demonstrate the problem. It's not wired into the test framework, because I don't know TCL so I'm not sure how to automate it.
-
- 16 Jul, 2018 1 commit
-
-
Oran Agra authored
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
-
- 19 Jun, 2018 1 commit
-
-
Oran Agra authored
this reduces the extra 8 bytes we save before each pointer. but more importantly maybe, it makes the valgrind runs to be more similiar to our normal runs. note: the change in malloc_stats struct in server.h is to eliminate an name conflict. structs that are not typedefed are resolved from a separate name space.
-
- 12 Mar, 2018 1 commit
-
-
Oran Agra authored
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
-
- 09 May, 2017 1 commit
-
-
antirez authored
-
- 10 Jan, 2017 1 commit
-
-
antirez authored
This commit also includes minor aesthetic changes like removal of trailing spaces.
-
- 30 Dec, 2016 1 commit
-
-
oranagra authored
-
- 19 Sep, 2016 1 commit
-
-
antirez authored
The goal is to get copy-on-write amount of the child from the parent.
-
- 17 Dec, 2014 1 commit
-
-
antirez authored
See issue #2218.
-
- 12 Nov, 2014 1 commit
-
-
antirez authored
-
- 24 Mar, 2014 1 commit
-
-
antirez authored
Obtaining the RSS (Resident Set Size) info is slow in Linux and OSX. This slowed down the generation of the INFO 'memory' section. Since the RSS does not require to be a real-time measurement, we now sample it with server.hz frequency (10 times per second by default) and use this value both to show the INFO rss field and to compute the fragmentation ratio. Practically this does not make any difference for memory profiling of Redis but speeds up the INFO call significantly.
-
- 19 Nov, 2012 1 commit
-
-
antirez authored
For non Linux systmes it just returns 0. This function is useful to estimate copy-on-write because of childs saving stuff on disk.
-
- 24 Aug, 2012 1 commit
-
-
antirez authored
The previous implementation of zmalloc.c was not able to handle out of memory in an application-specific way. It just logged an error on standard error, and aborted. The result was that in the case of an actual out of memory in Redis where malloc returned NULL (In Linux this actually happens under specific overcommit policy settings and/or with no or little swap configured) the error was not properly logged in the Redis log. This commit fixes this problem, fixing issue #509. Now the out of memory is properly reported in the Redis log and a stack trace is generated. The approach used is to provide a configurable out of memory handler to zmalloc (otherwise the default one logging the event on the standard output is used).
-
- 16 May, 2012 1 commit
-
-
antirez authored
Full changelog here: http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git;a=blob_plain;f=ChangeLog;hb=master Notable improvements from the point of view of Redis: 1) Bugfixing. 2) Support for Valgrind. 3) Support for OSX Lion, FreeBSD.
-
- 05 Apr, 2012 1 commit
-
-
Premysl Hruby authored
-
- 27 Mar, 2012 1 commit
-
-
antirez authored
Produce the watchlog warning log in a way that is safer from a signal handler. Fix a memory leak in the backtrace generation function.
-
- 07 Feb, 2012 1 commit
-
-
antirez authored
Precision of getClientOutputBufferMemoryUsage() greatily improved, see issue #327 for more information.
-
- 02 Jul, 2011 1 commit
-
-
antirez authored
-
- 20 Jun, 2011 1 commit
-
-
antirez authored
-
- 09 Jan, 2011 1 commit
-
-
antirez authored
-
- 02 Nov, 2010 1 commit
-
-
antirez authored
-
- 02 Sep, 2010 1 commit
-
-
antirez authored
-
- 24 Jul, 2010 1 commit
-
-
Benjamin Kramer authored
calloc is more effecient than malloc+memset when the system uses mmap to allocate memory. mmap always returns zeroed memory so the memset can be avoided. The threshold to use mmap is 16k in osx libc and 128k in bsd libc and glibc. The kernel can lazily allocate the pages, this reduces memory usage when we have a page table or hash table that is mostly empty. This change is most visible when you start a new redis instance with vm enabled. You'll see no increased memory usage no matter how big your page table is.
-
- 01 Jul, 2010 1 commit
-
-
antirez authored
networking related stuff moved into networking.c moved more code more work on layout of source code SDS instantaneuos memory saving. By Pieter and Salvatore at VMware ;) cleanly compiling again after the first split, now splitting it in more C files moving more things around... work in progress split replication code splitting more Sets split Hash split replication split even more splitting more splitting minor change
-
- 19 Feb, 2010 1 commit
-
-
antirez authored
A problem with replication with multiple slaves connectiong to a single master fixed. It was due to a typo, and reported on github by the user micmac. Also the copyright year fixed from many files.
-
- 15 Jan, 2010 1 commit
-
-
antirez authored
-
- 23 Mar, 2009 1 commit
-
-
antirez authored
-
- 22 Mar, 2009 1 commit
-
-
antirez authored
-