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

improve startup performance #9162

Merged
merged 3 commits into from
Nov 27, 2017
Merged

improve startup performance #9162

merged 3 commits into from
Nov 27, 2017

Conversation

stuartcarnie
Copy link
Contributor

@stuartcarnie stuartcarnie commented Nov 27, 2017

  • replaces coordinating goroutines for single k-way heap merge iterator
  • removes contention sending keys across buffered channels

startup time from 46s -> 28s for iterating 1MM keys across 14 shards

Required for all non-trivial PRs
  • Rebased/mergable
  • Tests pass
  • CHANGELOG.md updated

* replaces coordinating goroutines for single k-way heap merge iterator
* removes contention sending keys across buffered channels

startup time from 46s -> 28s for iterating 1MM keys across 14 shards
@ghost ghost assigned stuartcarnie Nov 27, 2017
@ghost ghost added the review label Nov 27, 2017
Copy link
Contributor

@jwilder jwilder left a comment

Choose a reason for hiding this comment

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

Small comment question, but looks good.


type keyIterator struct {
f TSMFile
p, n int
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment what p and n are?

Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming p is the current index and n is the total number of keys?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do 👍🏻

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@stuartcarnie stuartcarnie merged commit f23dc15 into master Nov 27, 2017
@ghost ghost removed the review label Nov 27, 2017
@stuartcarnie stuartcarnie deleted the sgc-walkkeys branch November 27, 2017 20:47
stuartcarnie added a commit that referenced this pull request Nov 27, 2017
* only call ParseTags when necessary
* remove dependency on inmem.Series in tsdb test package
* Measurement and Series are no longer exported. Their use is restricted
  to the inmem package
* improve Measurement and Series types by exporting immutable
  fields and removing unnecessary APIs and locks

Reduced startup time from 28s to 17s. Overall improvement including
#9162 reduces startup from 46s to 17s for 1MM series across 14 shards.
@stuartcarnie stuartcarnie mentioned this pull request Nov 27, 2017
3 tasks
stuartcarnie added a commit that referenced this pull request Nov 28, 2017
* only call ParseTags when necessary
* remove dependency on inmem.Series in tsdb test package
* Measurement and Series are no longer exported. Their use is restricted
  to the inmem package
* improve Measurement and Series types by exporting immutable
  fields and removing unnecessary APIs and locks

Reduced startup time from 28s to 17s. Overall improvement including
#9162 reduces startup from 46s to 17s for 1MM series across 14 shards.
stuartcarnie added a commit that referenced this pull request Dec 29, 2017
* only call ParseTags when necessary
* remove dependency on inmem.Series in tsdb test package
* Measurement and Series are no longer exported. Their use is restricted
  to the inmem package
* improve Measurement and Series types by exporting immutable
  fields and removing unnecessary APIs and locks

Reduced startup time from 28s to 17s. Overall improvement including
#9162 reduces startup from 46s to 17s for 1MM series across 14 shards.
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