Coder Social home page Coder Social logo

Comments (5)

lmatz avatar lmatz commented on September 26, 2024 1

Repost observation and experiments done by @MrCroxx for better visibility:

output.xlsx

There are three observations:

  1. uneven data among different epochs when that epoch gets evicted.

SCR-20240325-ipl

  1. a single eviction of multiple epochs and the size of data evicted is huge
    SCR-20240325-iq5

  2. a single eviction of a single epoch and the size of data evicted is huge
    SCR-20240325-ir3

For phenomena 1 and 2, there was a speculation that each time an entry is accessed, the entry's epoch is increased, causing older epoch data to gradually decrease, leading to evicting data with fewer older epochs first. After evicting several epochs and finding that memory did not decrease, a more aggressive exponential evicting of epochs began, ultimately resulting in the eviction of data from epochs with a larger amount of newer data.

This speculation may explain the issue when the barrier frequency is high. However, for phenomenon 3 observed in the 10-second barrier experiment mentioned above, it seems more like there are too few epochs to adequately partition the eviction scope.

In the future, I will try other strategies such as incorporating epochs and quotas, using quotas only without epochs, or exploring alternative strategies.

from risingwave.

MrCroxx avatar MrCroxx commented on September 26, 2024 1

The evicted bytes by epoch (summed by all LRUs, 1s barrier):

https://1drv.ms/x/s!AiJJmrmsw_N2mxGoFZbGAYSRGstJ?e=B76XvA

image

from risingwave.

fuyufjh avatar fuyufjh commented on September 26, 2024

The metrics mentioned in #14797 (comment) is somehow expected under our current implementation of LRU memory manager.

The root cause is because the feedback loop between LRU watermark and actual usage is much slower than 1 second (the default running interval of the memory policy). The memory manager assumes its feedback at previous run has been reflected in the current memory usage, but it's not, actually.

To get rid of this assumption, we have discussed on several ideas. For example, we may let each streaming executor report its LRU cache memory usage by epoch, so that the memory manager can find out the best LRU watermark accordingly.

from risingwave.

lmatz avatar lmatz commented on September 26, 2024

TPC-H q4: #14811 (comment)
has a very similar observation

Edit:
q4 is not affected by eviction though as it does not need a very big cache and its cache miss ops/rate is very low

But q20 does get affected by this as shown at #14797 (comment)

from risingwave.

lmatz avatar lmatz commented on September 26, 2024

TPC-H q17: #14799 (comment) also has a very similar observation

from risingwave.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.