Commit Graph

71 Commits (80cd5e63af7c39ff111c91c7fdbcf0eb8bf49655)

Author SHA1 Message Date
Jason Wilder 000768371f Optimized deletes in TSM index
This optimizes how deletes are processed to reduce memory usage
and improve efficiency.
2017-11-13 09:02:08 -07:00
Stuart Carnie 415ed14c53 storage service
* storage service is disabled by default
* default port 8082
* RPC interface generated using yarpc via service.proto
2017-10-25 13:38:07 -07:00
Stuart Carnie ac3bf300d3 fix overflow for 32-bit architecture 2017-10-20 10:22:28 -07:00
Stuart Carnie 47a2f8745e make (*T).Helper() optional 2017-10-20 08:59:50 -07:00
Stuart Carnie e9313876ab EXPLAIN ANALYZE
* Introduces EXPLAIN ANALYZE command, which
  produces a detailed tree of operations used to
  execute the query.

introduce context.Context to APIs

metrics package

* create groups of named measurements
* safe for concurrent access

tracing package

EXPLAIN ANALYZE implementation for OSS

Serialize EXPLAIN ANALYZE traces from remote nodes

use context.Background for tests

group with other stdlib packages

additional documentation and remove unused API

use influxdb/pkg/testing/assert

remove testify reference
2017-10-20 08:01:37 -07:00
Ben Johnson d17d0f18e0
Move copyBytes() and copyByteSlices() to bytesutil. 2017-10-18 07:19:46 -06:00
Jason Wilder ae821f4e2d Rework compaction scheduling
This changes the compaction scheduling to better utilize the available
cores that are free.  Previously, a level was planned in its own goroutine
and would kick off a number of compactions groups.  The problem with this
model was that if there were 4 groups, and 3 completed quickly, the planning
would be blocked for that level until the last group finished.  If the compactions
at the prior level are running more quickly, a large backlog could accumlate.

This now moves the planning to a single goroutine that plans each level in
succession and starts as many groups as it can.  When one group finishes,
the planning will start the next group for the level.
2017-10-03 10:48:13 -06:00
Edd Robinson a174f65595 use math/bits in HLL implementation 2017-09-26 12:51:08 +01:00
Edd Robinson 1028818ba6 Perf boost with some bit twiddling 2017-09-22 17:59:39 +01:00
Edd Robinson 5b7fc517fa Improve performance of TSI bloom filter
This commit replaces the previous hashing algorithm used by the pkg.Filter with
one based on xxhash. Further, taking from the hashing literature, we can
represent k hashes with only two hash function, where previously Filter was using
four.

Further, unlike `murmur3`, `xxhash` is allocation-free, so allocations have
dramatically reduced when inserting and checking for hashes.
2017-09-22 17:59:39 +01:00
Edd Robinson fe960b0f3a Add benchmarks for bloom filter 2017-09-22 17:59:32 +01:00
Jason Wilder db204f3eb7 Default concurrent compactions to 50% of available cores 2017-09-21 12:48:11 -06:00
Ben Johnson a40b2bb210 Simplify bloom filter invalidation. 2017-09-11 15:29:26 -06:00
Jason Wilder d3e832b462 Use offheap memory for indirect index offsets slice 2017-09-11 15:29:25 -06:00
Jason Wilder 4009223fb6 Avoid allocating murmur3.Hash too frequently
These hashes were getting allocate very frequently with high cardinality
datasets.  This allows them to be re-used.
2017-09-11 15:26:24 -06:00
Matt McCoy e43bec4a3a Test slices strings Exists* functions 2017-08-08 20:33:26 -04:00
Edd Robinson a43238618e Merge pull request #8512 from axiomhq/loglogbeta
Switch to LogLog-Beta Cardinality estimation
2017-07-07 16:14:16 +01:00
Seif Lotfy 4cb01c1768 change beta constants for the hll cardinality bias estimator 2017-06-30 07:47:16 -07:00
Jason Wilder cf6d4b6e71 Fix building on solaris/illumos 2017-06-21 09:16:45 -06:00
Seif Lotfy 643b2eb30c Switch to LogLog-Beta Cardinality estimation
The new algorithm uses only one formula and needs no additional bias corrections for the entire range of cardinalities,
therefore, it is more efficient and simpler to implement. Our simulations show that the accuracy provided by the new
algorithm is as good as or better than the accuracy provided by either of HyperLogLog or HyperLogLog++. The sparse
representation was kept in to provide better low cardinality accuracy. However the linear counting and range estimations
are replaced.
2017-06-20 15:25:01 +02:00
Ben Johnson 1975940f76
intermediate compaction commit 2017-05-23 08:42:25 -06:00
Ben Johnson 48a06432df
Add tsi1 bloom filter. 2017-05-23 08:41:31 -06:00
Ben Johnson 623ff67221
Fix HLL variableLengthList size decoding. 2017-05-19 11:44:25 -06:00
Jason Wilder 503d41a08f Add LimitedBytePool for wal buffers
This pool was previously a pool.Bytes to avoid repetitive allocations.
It was recently switchted to a sync.Pool because pool.Bytes held onto
very larger buffers at times which were never released.  sync.Pool is
showing up in allocation profiles quite frequently.

This switches the pool to a new pool that limits how many buffers are
in the pool as well as the max size of each buffer in the pool.  This
provides better bounds on allocations.
2017-05-11 11:27:00 -06:00
Ben Johnson 0d74497abe
Reset rhh map elements to reuse allocations. 2017-04-04 11:57:37 -06:00
Ben Johnson 95d4016ff2
Merge branch 'tsi' of https://github.com/influxdata/influxdb into tsi-series-block-partitioning 2017-04-04 10:14:03 -06:00
Ben Johnson bf49b176f5
Partition tsi1 series index. 2017-04-04 09:46:04 -06:00
Jason Wilder 8da84e6144 Merge branch 'master' into tsi 2017-04-03 11:21:02 -06:00
Edd Robinson 1c4ecb12c1 Don't panic on nil engine 2017-03-22 10:07:29 -06:00
Ben Johnson 1e9fa7bc2c
Fix 32-bit rhh implementation. 2017-03-21 11:44:13 -06:00
Ben Johnson 70efc70abe
Reduce lock contention, fix rhh lookup. 2017-03-17 09:44:11 -06:00
Stuart Carnie 0ebbfb8f77 hll: skip recalc of sparseSet if tmpSet is empty
```
benchmark                                 old ns/op     new ns/op     delta
BenchmarkSet_Count/set_size_1000-8        38095         28.3          -99.93%
BenchmarkSet_Count/set_size_5000-8        152052        30.1          -99.98%
BenchmarkSet_Count/set_size_10000-8       50953         54978         +7.90%
BenchmarkSet_Count/set_size_50000-8       32495         31222         -3.92%
BenchmarkSet_Count/set_size_1000000-8     32603         30800         -5.53%

benchmark                                 old allocs     new allocs     delta
BenchmarkSet_Count/set_size_1000-8        4              0              -100.00%
BenchmarkSet_Count/set_size_5000-8        4              0              -100.00%
BenchmarkSet_Count/set_size_10000-8       0              0              +0.00%
BenchmarkSet_Count/set_size_50000-8       0              0              +0.00%
BenchmarkSet_Count/set_size_1000000-8     0              0              +0.00%

benchmark                                 old bytes     new bytes     delta
BenchmarkSet_Count/set_size_1000-8        16496         0             -100.00%
BenchmarkSet_Count/set_size_5000-8        16497         0             -100.00%
BenchmarkSet_Count/set_size_10000-8       0             0             +0.00%
BenchmarkSet_Count/set_size_50000-8       0             0             +0.00%
BenchmarkSet_Count/set_size_1000000-8     0             0             +0.00%
```
2017-01-31 08:51:05 -07:00
Edd Robinson ab94c1b743 Fixes #7882 2017-01-30 19:12:24 +00:00
Edd Robinson 695adafc00
Add measurement sketches 2017-01-05 10:15:37 -07:00
Edd Robinson 1339c7b146
Initialise HLL with error 2017-01-05 10:15:37 -07:00
Ben Johnson 9f8b206b51
Fix measurement system queries. 2017-01-05 10:15:34 -07:00
Ben Johnson fa7239ecad
Fix windows mmap 2017-01-05 10:11:12 -07:00
Ben Johnson cb93f10120
Remove per-shard in-memory index. 2017-01-05 10:11:09 -07:00
Ben Johnson 8863e3c0f3
Refactor tsi1 merge iterators, finish multi-file compaction. 2017-01-05 10:01:25 -07:00
Edd Robinson e2c3b52ca4
Adds a custom HyperLogLog++ implementation 2017-01-05 10:00:14 -07:00
Edd Robinson 149b1cef1d
Fix 32bit overflow; limit capacity 2017-01-05 09:59:10 -07:00
Edd Robinson 2a5c865b44
Use xxhash 2017-01-05 09:57:35 -07:00
Edd Robinson bd8dd9a291
Sketches working 2017-01-05 09:54:04 -07:00
Edd Robinson d19fbf5ab4
Wire in HLL estimator 2017-01-05 09:54:03 -07:00
Ben Johnson 57d0556174
Fix 32-bit issues. 2017-01-05 09:34:37 -07:00
Ben Johnson 8d40ceb00c
TSI1 Index 2017-01-05 09:34:36 -07:00
Ben Johnson 3240af07e0
Fix RHH packing. 2017-01-05 09:34:36 -07:00
Ben Johnson e25d61e4bd
TagSet writer & reader. 2017-01-05 09:34:36 -07:00
Ben Johnson 2c34b24f5c
Implemented SeriesList 2017-01-05 09:34:36 -07:00
Ben Johnson 6523675c20
Implemented RHH hash map. 2017-01-05 09:34:35 -07:00