feat: change prefix_extractor to 128 (#473)

* feat: change the size of log max files

Signed-off-by: Gaius <gaius.qi@gmail.com>

* feat: change prefix_extractor to 128

Signed-off-by: Gaius <gaius.qi@gmail.com>

---------

Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
Gaius 2024-05-15 22:18:58 +08:00 committed by GitHub
parent cacd03538d
commit fd1f368601
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 18 deletions

16
Cargo.lock generated
View File

@ -959,7 +959,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client" name = "dragonfly-client"
version = "0.1.58" version = "0.1.59"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bytes", "bytes",
@ -1022,7 +1022,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client-backend" name = "dragonfly-client-backend"
version = "0.1.58" version = "0.1.59"
dependencies = [ dependencies = [
"dragonfly-client-core", "dragonfly-client-core",
"futures", "futures",
@ -1040,7 +1040,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client-config" name = "dragonfly-client-config"
version = "0.1.58" version = "0.1.59"
dependencies = [ dependencies = [
"dragonfly-client-core", "dragonfly-client-core",
"home", "home",
@ -1059,7 +1059,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client-core" name = "dragonfly-client-core"
version = "0.1.58" version = "0.1.59"
dependencies = [ dependencies = [
"libloading", "libloading",
"reqwest", "reqwest",
@ -1070,7 +1070,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client-init" name = "dragonfly-client-init"
version = "0.1.58" version = "0.1.59"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",
@ -1086,7 +1086,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client-storage" name = "dragonfly-client-storage"
version = "0.1.58" version = "0.1.59"
dependencies = [ dependencies = [
"base16ct", "base16ct",
"blake3", "blake3",
@ -1110,7 +1110,7 @@ dependencies = [
[[package]] [[package]]
name = "dragonfly-client-util" name = "dragonfly-client-util"
version = "0.1.58" version = "0.1.59"
dependencies = [ dependencies = [
"dragonfly-api", "dragonfly-api",
"dragonfly-client-core", "dragonfly-client-core",
@ -1568,7 +1568,7 @@ dependencies = [
[[package]] [[package]]
name = "hdfs" name = "hdfs"
version = "0.1.58" version = "0.1.59"
dependencies = [ dependencies = [
"dragonfly-client-backend", "dragonfly-client-backend",
"dragonfly-client-core", "dragonfly-client-core",

View File

@ -12,7 +12,7 @@ members = [
] ]
[workspace.package] [workspace.package]
version = "0.1.58" version = "0.1.59"
authors = ["The Dragonfly Developers"] authors = ["The Dragonfly Developers"]
homepage = "https://d7y.io/" homepage = "https://d7y.io/"
repository = "https://github.com/dragonflyoss/client.git" repository = "https://github.com/dragonflyoss/client.git"
@ -22,13 +22,13 @@ readme = "README.md"
edition = "2021" edition = "2021"
[workspace.dependencies] [workspace.dependencies]
dragonfly-client = { path = "dragonfly-client", version = "0.1.58" } dragonfly-client = { path = "dragonfly-client", version = "0.1.59" }
dragonfly-client-core = { path = "dragonfly-client-core", version = "0.1.58" } dragonfly-client-core = { path = "dragonfly-client-core", version = "0.1.59" }
dragonfly-client-config = { path = "dragonfly-client-config", version = "0.1.58" } dragonfly-client-config = { path = "dragonfly-client-config", version = "0.1.59" }
dragonfly-client-storage = { path = "dragonfly-client-storage", version = "0.1.58" } dragonfly-client-storage = { path = "dragonfly-client-storage", version = "0.1.59" }
dragonfly-client-backend = { path = "dragonfly-client-backend", version = "0.1.58" } dragonfly-client-backend = { path = "dragonfly-client-backend", version = "0.1.59" }
dragonfly-client-util = { path = "dragonfly-client-util", version = "0.1.58" } dragonfly-client-util = { path = "dragonfly-client-util", version = "0.1.59" }
dragonfly-client-init = { path = "dragonfly-client-init", version = "0.1.58" } dragonfly-client-init = { path = "dragonfly-client-init", version = "0.1.59" }
thiserror = "1.0" thiserror = "1.0"
dragonfly-api = "2.0.112" dragonfly-api = "2.0.112"
reqwest = { version = "0.11.27", features = ["stream", "native-tls", "default-tls", "rustls-tls"] } reqwest = { version = "0.11.27", features = ["stream", "native-tls", "default-tls", "rustls-tls"] }

View File

@ -66,8 +66,8 @@ impl RocksdbStorageEngine {
options.optimize_level_style_compaction(Self::DEFAULT_MEMTABLE_MEMORY_BUDGET); options.optimize_level_style_compaction(Self::DEFAULT_MEMTABLE_MEMORY_BUDGET);
options.increase_parallelism(num_cpus::get() as i32); options.increase_parallelism(num_cpus::get() as i32);
options.set_max_open_files(Self::DEFAULT_MAX_OPEN_FILES); options.set_max_open_files(Self::DEFAULT_MAX_OPEN_FILES);
// Set prefix extractor to reduce the memory usage of bloom filter and length of task id is 64. // Set prefix extractor to reduce the memory usage of bloom filter.
options.set_prefix_extractor(rocksdb::SliceTransform::create_fixed_prefix(64)); options.set_prefix_extractor(rocksdb::SliceTransform::create_fixed_prefix(128));
options.set_memtable_prefix_bloom_ratio(0.2); options.set_memtable_prefix_bloom_ratio(0.2);
// Initialize rocksdb block based table options. // Initialize rocksdb block based table options.