Skip to content

Evaluate options to reduce tcache GC cost. #840

Open

Description

@interwq

Currently tcache does GC after every N (fixed) requests. We experimented that in some workload reducing the GC frequency could yield a measurable perf win. We'd like to avoid adding another runtime option for this. Let's consider other options to improve things here.

Possible directions:

  1. combine wall time w/ # of iterations, e.g. do rate limiting on top of fixed N requests.
  2. when background_thread is enabled, make it scan tcache stats etc to make smarter decisions about the interval.
  3. also consider fragmentation when making the decision, e.g. how many extents are covered in the bins, any extents from remote arenas.
    Investigate trylock in tcache_dalloc #807 could also help when done properly.

Activity

  1. added this to the 5.1.0 milestone on May 16, 2017
  2. self-assigned this
    on May 16, 2017
  3. davidtgoldblatt commented on May 16, 2017

    @davidtgoldblatt
    Contributor

    @djwatson, you were experimenting a signal-based approach for this sort of thing, right? Did you discover anything interesting?

  4. djwatson commented on May 17, 2017

    @djwatson

    Here it is:

    https://gist.github.com/djwatson/3658c153141d4b67e290906315c61eb2

    It was very sensitive to tuning, but did seem to reduce memory usage in some cases. I didn't see performance improvement otherwise.

    Perhaps surprisingly, I didn't see any issues in prod due to extra use of signals.

  5. modified the milestones: 5.1.0, 5.2.0 on Apr 11, 2018
  6. modified the milestones: 5.2.0, 6.0 on Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions