mirror of
https://github.com/fluencelabs/redis
synced 2025-06-13 01:01:22 +00:00
Merge branch 'unstable' of github.com:/antirez/redis into unstable
This commit is contained in:
@ -1019,7 +1019,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
|
||||
if (zmalloc_used_memory() > server.stat_peak_memory)
|
||||
server.stat_peak_memory = zmalloc_used_memory();
|
||||
|
||||
run_with_period(10) {
|
||||
run_with_period(100) {
|
||||
/* Sample the RSS and other metrics here since this is a relatively slow call.
|
||||
* We must sample the zmalloc_used at the same time we take the rss, otherwise
|
||||
* the frag ratio calculate may be off (ratio of two samples at different times) */
|
||||
|
@ -301,10 +301,13 @@ size_t zmalloc_get_rss(void) {
|
||||
int zmalloc_get_allocator_info(size_t *allocated,
|
||||
size_t *active,
|
||||
size_t *resident) {
|
||||
size_t epoch = 1, sz = sizeof(size_t);
|
||||
uint64_t epoch = 1;
|
||||
size_t sz;
|
||||
*allocated = *resident = *active = 0;
|
||||
/* Update the statistics cached by mallctl. */
|
||||
sz = sizeof(epoch);
|
||||
je_mallctl("epoch", &epoch, &sz, &epoch, sz);
|
||||
sz = sizeof(size_t);
|
||||
/* Unlike RSS, this does not include RSS from shared libraries and other non
|
||||
* heap mappings. */
|
||||
je_mallctl("stats.resident", resident, &sz, NULL, 0);
|
||||
|
Reference in New Issue
Block a user