Skip to content

Conversation

@soloestoy
Copy link
Contributor

@soloestoy soloestoy commented Dec 18, 2017

Hi @antirez

There are three problems about lazyfree eviction I think:

  1. We forgot the latency generated by waiting for BIO_LAZY_FREE

    I think it's necessary to record this kind of latency.

  2. Maybe we misuse latencyRemoveNestedEvent

    In my opinion the eviction-cycle should contains all latency, including eviction-del and eviction-lazyfree, so we should not remove eviction-del from eviction-cycle.

  3. The last problem is about cant_free

    When we goto cant_free, we wait for BIO_LAZY_FREE finished or break if already freed enough memory.

    But, we use mem_freed duplicately.

        while(bioPendingJobsOfType(BIO_LAZY_FREE)) {
            if (((mem_reported - zmalloc_used_memory()) + mem_freed) >= mem_tofree)
                break;
            usleep(1000);
        }
    

    I add a variable mem_used_init to record the initial used memory, please check.

1. add eviction-lazyfree monitor
2. put eviction-del & eviction-lazyfree into eviction-cycle
   that means eviction-cycle contains all the latency in
   the eviction cycle including del and lazyfree
@soloestoy soloestoy closed this Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant