Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
245b875
refactor(fracmanager): using fifo queues of fractions
eguguchkin Nov 6, 2025
2e2c673
fix: return data provider release
eguguchkin Nov 21, 2025
2730b2a
feat(frac): new active fraction implementation based in mini-indexes
eguguchkin Dec 6, 2025
113b9c3
reuse slices
eguguchkin Dec 7, 2025
d84e7e5
sealing and merging
eguguchkin Dec 10, 2025
92e0f45
merging optimizations 1 step
eguguchkin Dec 12, 2025
72958fe
merging optimizations 2 step
eguguchkin Dec 16, 2025
d2dd334
full frac write bench
eguguchkin Dec 16, 2025
e015add
enable background merging
eguguchkin Dec 18, 2025
070a63f
tune merge strategy
eguguchkin Dec 19, 2025
84a0879
tune merge strategy: remove tires and use generations
eguguchkin Dec 21, 2025
b32f934
naming + comments
eguguchkin Dec 21, 2025
b858ddb
replace old active with a new one
eguguchkin Dec 24, 2025
f7f3305
add deduplication, fix mid.time overflow, replace aold active with ne…
eguguchkin Dec 26, 2025
06da534
remake clone token table
eguguchkin Dec 26, 2025
c17dfd3
remake clone token table 2
eguguchkin Dec 26, 2025
7860811
disable alloc pools
eguguchkin Dec 26, 2025
210b19b
enable alloc pools
eguguchkin Dec 26, 2025
e62e18f
res pool experiments
eguguchkin Dec 29, 2025
63674a6
fix panic
eguguchkin Dec 29, 2025
26b2845
resources test
eguguchkin Dec 29, 2025
ecf9d59
res pool experiments 2
eguguchkin Dec 29, 2025
fcb45ce
res pool experiments 3
eguguchkin Dec 29, 2025
bff6bcf
res pool experiments 4
eguguchkin Dec 29, 2025
fcc0501
res pool experiments 5
eguguchkin Dec 29, 2025
e73ee17
res pool experiments 6
eguguchkin Dec 29, 2025
e81e9bf
res pool experiments 7
eguguchkin Dec 29, 2025
067dc8a
deduplication tests
eguguchkin Jan 14, 2026
c370a4c
prepare bench conf
eguguchkin Feb 26, 2026
493aa46
merge metrics
eguguchkin Feb 26, 2026
7f4ce85
tune gc
eguguchkin Feb 26, 2026
19c1a08
tune cfg 2
eguguchkin Feb 27, 2026
b4476ee
tune meta decoding
eguguchkin Feb 28, 2026
c093493
tune meta decoding2
eguguchkin Feb 28, 2026
4c08823
use lz4
eguguchkin Mar 2, 2026
befb1b4
use zstd
eguguchkin Mar 2, 2026
c7ae72d
sort bench
eguguchkin Mar 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ WIP

**Code that does not comply with these standards will require revision before acceptance.**

## General Coding Guidelines

**All metrics** must follow the [OpenMetrics](https://openmetrics.io/) standard convention.

## Mandatory Branch Naming Convention

Branch names must use `kebab-case` and strictly follow this format:
Expand Down
18 changes: 18 additions & 0 deletions .seqbench/baseline.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
GOGC=100

SEQDB_STORAGE_FRAC_SIZE=16MiB
SEQDB_STORAGE_TOTAL_SIZE=10GiB

SEQDB_LIMITS_QUERY_RATE=1024
SEQDB_LIMITS_SEARCH_REQUESTS=1024
SEQDB_LIMITS_BULK_REQUESTS=128
SEQDB_LIMITS_INFLIGHT_BULK=128

# DO NOT CHANGE FOLLOWING VALUES
# SEQBAZOOKA RELIES ON THEM
SEQDB_STORAGE_DATA_DIR=/var/seqdb
SEQDB_MAPPING_PATH=/etc/mapping.yaml

SEQDB_RESOURCES_SKIP_FSYNC=1
SEQDB_COMPRESSION_DOCS_ZSTD_COMPRESSION_LEVEL=1
SEQDB_COMPRESSION_METAS_ZSTD_COMPRESSION_LEVEL=1
18 changes: 18 additions & 0 deletions .seqbench/comparison.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
GOGC=50

SEQDB_STORAGE_FRAC_SIZE=16MiB
SEQDB_STORAGE_TOTAL_SIZE=10GiB

SEQDB_LIMITS_QUERY_RATE=1024
SEQDB_LIMITS_SEARCH_REQUESTS=1024
SEQDB_LIMITS_BULK_REQUESTS=128
SEQDB_LIMITS_INFLIGHT_BULK=128

# DO NOT CHANGE FOLLOWING VALUES
# SEQBAZOOKA RELIES ON THEM
SEQDB_STORAGE_DATA_DIR=/var/seqdb
SEQDB_MAPPING_PATH=/etc/mapping.yaml

SEQDB_RESOURCES_SKIP_FSYNC=1
SEQDB_COMPRESSION_DOCS_ZSTD_COMPRESSION_LEVEL=1
SEQDB_COMPRESSION_METAS_ZSTD_COMPRESSION_LEVEL=1
7 changes: 5 additions & 2 deletions asyncsearcher/async_searcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,25 @@ var (
Namespace: "seq_db_store",
Subsystem: "async_search",
Name: "in_progress",
Help: "Amount of active async searches in progress",
Help: "Number of active async searches in progress",
})
asyncSearchDiskUsage = promauto.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "seq_db_store",
Subsystem: "async_search",
Name: "disk_usage_bytes_total",
Name: "disk_usage_bytes",
Help: "Disk space used by async search files in bytes by file type",
}, []string{"file_type"})
asyncSearchStoredRequests = promauto.NewGauge(prometheus.GaugeOpts{
Namespace: "seq_db_store",
Subsystem: "async_search",
Name: "stored_requests",
Help: "Number of stored async search requests",
})
asyncSearchReadOnly = promauto.NewGauge(prometheus.GaugeOpts{
Namespace: "seq_db_store",
Subsystem: "async_search",
Name: "read_only",
Help: "Indicates if store is in async search read-only mode (can not start a new async search) due to disk usage limits",
})
)

Expand Down
7 changes: 3 additions & 4 deletions asyncsearcher/async_searcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,18 @@ import (
"github.com/stretchr/testify/require"

"github.com/ozontech/seq-db/frac"
"github.com/ozontech/seq-db/frac/common"
"github.com/ozontech/seq-db/frac/processor"
"github.com/ozontech/seq-db/mappingprovider"
"github.com/ozontech/seq-db/seq"
)

type fakeFrac struct {
frac.Fraction
info common.Info
info frac.Info
dp fakeDP
}

func (f *fakeFrac) Info() *common.Info {
func (f *fakeFrac) Info() *frac.Info {
return &f.info
}

Expand Down Expand Up @@ -51,7 +50,7 @@ func TestAsyncSearcherMaintain(t *testing.T) {
Retention: time.Hour,
}
fracs := []frac.Fraction{
&fakeFrac{info: common.Info{Path: "1"}},
&fakeFrac{info: frac.Info{Path: "1"}},
}
r.NoError(as.StartSearch(req, fracs))

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/docker-compose-seqdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
limits:
cpus: "4"
memory: "8GB"
image: ghcr.io/ozontech/seq-db:v0.61.0
image: 'gitlab-registry.ozon.ru/sre/images/seq-db:che@sha256:82d0dd34cb5d6db9e0450bc8d2cd1d9e29414ec2ba81dc8c4ae643dea6eb1bd0'
ports:
- '9002:9002'
volumes:
Expand Down
8 changes: 4 additions & 4 deletions bytespool/bytespool.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,27 @@ var (
Namespace: "seq_db",
Subsystem: "common",
Name: "bytes_pool_get_hits_total",
Help: "",
Help: "Number of hits while obtaining a buffer from the bytes pool",
}, []string{"capacity"})
missCounter = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: "seq_db",
Subsystem: "common",
Name: "bytes_pool_get_misses_total",
Help: "",
Help: "Number of misses while obtaining a buffer from the bytes pool",
}, []string{"capacity"})

// put metrics
putCounter = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: "seq_db",
Subsystem: "common",
Name: "bytes_pool_puts_total",
Help: "",
Help: "Number of buffers returned to the bytes pool",
}, []string{"capacity"})
putOversizeCounter = promauto.NewCounter(prometheus.CounterOpts{
Namespace: "seq_db",
Subsystem: "common",
Name: "bytes_pool_put_oversizes_total",
Help: "",
Help: "Number of buffers rejected on return due to exceeding capacity",
})
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/distribution/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/ozontech/seq-db/cache"
"github.com/ozontech/seq-db/consts"
"github.com/ozontech/seq-db/frac/common"
"github.com/ozontech/seq-db/frac"
"github.com/ozontech/seq-db/frac/sealed"
"github.com/ozontech/seq-db/fracmanager"
"github.com/ozontech/seq-db/logger"
Expand Down Expand Up @@ -59,7 +59,7 @@ func readBlock(reader storage.IndexReader, blockIndex uint32) ([]byte, error) {
return data, nil
}

func loadInfo(path string) *common.Info {
func loadInfo(path string) *frac.Info {
indexReader, f := getReader(path)
defer f.Close()

Expand Down Expand Up @@ -87,7 +87,7 @@ func loadInfo(path string) *common.Info {
return b.Info
}

func buildDist(dist *seq.MIDsDistribution, path string, _ *common.Info) {
func buildDist(dist *seq.MIDsDistribution, path string, _ *frac.Info) {
blocksReader, f := getReader(path)
defer f.Close()

Expand Down
4 changes: 2 additions & 2 deletions cmd/seq-db/seq-db.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/ozontech/seq-db/config"
"github.com/ozontech/seq-db/consts"
"github.com/ozontech/seq-db/frac"
"github.com/ozontech/seq-db/frac/common"
"github.com/ozontech/seq-db/fracmanager"
"github.com/ozontech/seq-db/logger"
"github.com/ozontech/seq-db/mappingprovider"
Expand Down Expand Up @@ -259,7 +258,8 @@ func startStore(
MaintenanceDelay: 0,
CacheGCDelay: 0,
CacheCleanupDelay: 0,
SealParams: common.SealParams{
MinSealFracSize: uint64(cfg.Storage.TotalSize) * consts.DefaultMinSealPercent / 100,
SealParams: frac.SealParams{
IDsZstdLevel: cfg.Compression.SealedZstdCompressionLevel,
LIDsZstdLevel: cfg.Compression.SealedZstdCompressionLevel,
TokenListZstdLevel: cfg.Compression.SealedZstdCompressionLevel,
Expand Down
2 changes: 1 addition & 1 deletion config/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var (
ReaderWorkers int

CaseSensitive = false
SkipFsync = false
SkipFsync = true

MaxFetchSizeBytes = 4 * units.MiB

Expand Down
Loading