Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.3 backports #8063

Merged
merged 6 commits into from
Feb 27, 2017
Merged

1.1.3 backports #8063

merged 6 commits into from
Feb 27, 2017

Conversation

jwilder
Copy link
Contributor

@jwilder jwilder commented Feb 27, 2017

This backports some allocation reductions from #7631 that can affect GC.

This allocates quite a bit and it's called multiple times per
second per shard.  The generations don't change until a compaction
has occurred so most of the time is re-calculating the same thing
and creating garbage.
Avoids an allocation when calling time.Sleep
I ran into an issue where the cache snapshotting seemed to stop
completely causing the cache to fill up and never recover.  I believe
this is due to the the Timer being reused incorrectly.  Instead,
use a Ticker that will fire more regularly and not require the resetting
logic (which was wrong).
Eliminates an allocation
A new sorted slice was called by the monitor func every 10s.  The
tag keys don't need to be sorted so this avoid the allocation of the
slice and one during sorting.
@jwilder jwilder added this to the 1.1.3 milestone Feb 27, 2017
Copy link
Contributor

@e-dard e-dard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Ticker/Timer changed confused me, as they're different in this backport and #7631, but looks like you added some more commits here.

LGTM 👍

@jwilder
Copy link
Contributor Author

jwilder commented Feb 27, 2017

@e-dard The original switch (9bf54d9) had a bug that was fixed via bea91f7

@jwilder jwilder merged commit 8e6398a into 1.1 Feb 27, 2017
@jwilder jwilder deleted the jw-11-backports branch February 27, 2017 18:43
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.

None yet

2 participants