Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 13 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
resolver = "3"
members = ["libnvme-sys", "nvme", "oxcache"]

[profile.dev]
debug-assertions = false

[profile.dev.package."*"]
opt-level = 3
strip = "none"
debug-assertions = false
2 changes: 1 addition & 1 deletion cortes.server.block.chunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ remote_artificial_delay_microsec = 40632
eviction_policy = "chunk"
high_water_evict = 1 # Number remaining from end, evicts if reaches here
low_water_evict = 3 # Evict until below mark
eviction_interval = 1 # Evict every 1s
eviction_interval_ms = 1000 # Evict every 1s

[metrics]
ip_addr = "127.0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion cortes.server.block.promo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ remote_artificial_delay_microsec = 40632
eviction_policy = "promotional"
high_water_evict = 1 # Number remaining from end, evicts if reaches here
low_water_evict = 3 # Evict until below mark
eviction_interval = 1 # Evict every 1s
eviction_interval_ms = 1000 # Evict every 1s

[metrics]
ip_addr = "127.0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion cortes.server.block.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ remote_artificial_delay_microsec = 40632
eviction_policy = "promotional"
high_water_evict = 1 # Number remaining from end, evicts if reaches here
low_water_evict = 3 # Evict until below mark
eviction_interval = 1 # Evict every 1s
eviction_interval_ms = 1000 # Evict every 1s

[metrics]
ip_addr = "127.0.0.1"
Expand Down
4 changes: 2 additions & 2 deletions cortes.server.zns.chunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ remote_artificial_delay_microsec = 40632
eviction_policy = "chunk"
high_water_evict = 16 # Number remaining from end, evicts if reaches here
low_water_evict = 32 # Evict until below mark
eviction_interval = 1 # Evict every 1s
eviction_interval_ms = 250 # Evict every 1s
high_water_clean = 16 # Number remaining from end, cleans if reaches here (only used with chunk)
low_water_clean = 8 # Clean until below mark (only used with chunk)

[metrics]
ip_addr = "127.0.0.1"
port = 9000
file_metrics_directory = "./logs"
file_metrics_directory = "./logs"
2 changes: 1 addition & 1 deletion cortes.server.zns.promo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ remote_artificial_delay_microsec = 40632
eviction_policy = "promotional"
high_water_evict = 1 # Number remaining from end, evicts if reaches here
low_water_evict = 3 # Evict until below mark
eviction_interval = 1 # Evict every 1s
eviction_interval_ms = 1000 # Evict every 1s

[metrics]
ip_addr = "127.0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion cortes.server.zns.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ remote_artificial_delay_microsec = 40632
eviction_policy = "promotional"
high_water_evict = 1 # Number remaining from end, evicts if reaches here
low_water_evict = 3 # Evict until below mark
eviction_interval = 1 # Evict every 1s
eviction_interval_ms = 1000 # Evict every 1s

[metrics]
ip_addr = "127.0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion example.server.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ remote_artificial_delay_microsec = 40632
eviction_policy = "promotional"
high_water_evict = 5 # Number remaining from end, evicts if reaches here
low_water_evict = 7 # Evict until below mark
eviction_interval = 1 # Evict every 1s
eviction_interval_ms = 1000 # Evict every 1s

[metrics]
ip_addr = "127.0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion github_runner.server.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ remote_artificial_delay_microsec = 40632
eviction_policy = "promotional"
high_water_evict = 1 # Number remaining from end, evicts if reaches here
low_water_evict = 3 # Evict until below mark
eviction_interval = 1 # Evict every 1s
eviction_interval_ms = 1000 # Evict every 1s

[metrics]
2 changes: 1 addition & 1 deletion local.server.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ remote_artificial_delay_microsec = 40632
eviction_policy = "promotional"
high_water_evict = 5 # Number remaining from end, evicts if reaches here
low_water_evict = 7 # Evict until below mark
eviction_interval = 1 # Evict every 1s
eviction_interval_ms = 1000 # Evict every 1s

[metrics]
ip_addr = "127.0.0.1"
Expand Down
3 changes: 2 additions & 1 deletion oxcache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async-trait = "0.1.88"
rand = "0.9.1"
rand_pcg = "0.9.0"
flume = "0.11.1"
lru = "0.16.0"
lru-mem = "0.3.0"
ndarray = "0.16.1"
uuid = { version = "1.17.0", features = ["v4"] }
byteorder = "1.5.0"
Expand All @@ -37,6 +37,7 @@ priority-queue = "2.5.0"
tracing-appender = "0.2.3"
tracing = "0.1.41"
chrono = "0.4.41"
libc = "0.2.175"

[[test]]
name = "integration_tests"
Expand Down
10 changes: 10 additions & 0 deletions oxcache/src/cache/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::request::GetRequest;
use nvme::types::{Byte, Zone};
use std::sync::{Arc, atomic::{AtomicUsize, Ordering}};
use tokio::sync::Notify;
use lru_mem::HeapSize;

#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub struct Chunk {
Expand All @@ -26,6 +27,15 @@ impl ChunkLocation {
}
}

impl HeapSize for ChunkLocation {
fn heap_size(&self) -> usize {
// ChunkLocation contains no heap-allocated data
0
}
}

// ValueSize is automatically implemented via blanket implementation

/// A ChunkLocation with pin counting for coordinating with eviction
#[derive(Debug)]
pub struct PinnedChunkLocation {
Expand Down
Loading
Loading