feat: update ttft modeling and add cache affinity

This commit is contained in:
2026-04-15 19:08:10 +08:00
parent ff316c6873
commit a3f386c858
15 changed files with 1276 additions and 99 deletions

View File

@@ -5,7 +5,7 @@
//! by `bytes / bw`. Latency is added on top of transfer time. This captures
//! contention without simulating individual packets.
use crate::config::HardwareConfig;
use crate::config::{CalibrationConfig, HardwareConfig};
#[derive(Debug, Clone)]
pub struct LinkModel {
@@ -53,10 +53,10 @@ pub struct InstanceLinks {
}
impl InstanceLinks {
pub fn from_hw(hw: &HardwareConfig) -> Self {
pub fn from_hw(hw: &HardwareConfig, calib: &CalibrationConfig) -> Self {
Self {
pcie: LinkModel::new(hw.pcie_bw, hw.pcie_latency_us * 1e-6),
rdma: LinkModel::new(hw.rdma_bw, hw.rdma_latency_us * 1e-6),
pcie: LinkModel::new(hw.pcie_bw * calib.pcie_bw_util, hw.pcie_latency_us * 1e-6),
rdma: LinkModel::new(hw.rdma_bw * calib.rdma_bw_util, hw.rdma_latency_us * 1e-6),
}
}
}