• A
    Sample and cache RSS in serverCron(). · 4ebc7e37
    antirez 提交于
    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.
    4ebc7e37
zmalloc.h 3.2 KB