• Oran Agra's avatar
    Defrag big lists in portions to avoid latency and freeze · 485425ce
    Oran Agra authored
    When active defrag kicks in and finds a big list, it will create a bookmark to
    a node so that it is able to resume iteration from that node later.
    
    The quicklist manages that bookmark, and updates it in case that node is deleted.
    
    This will increase memory usage only on lists of over 1000 (see
    active-defrag-max-scan-fields) quicklist nodes (1000 ziplists, not 1000 items)
    by 16 bytes.
    
    In 32 bit build, this change reduces the maximum effective config of
    list-compress-depth and list-max-ziplist-size (from 32767 to 8191)
    485425ce
memefficiency.tcl 11.9 KB