Documentation
¶
Overview ¶
Package bench is a POSIX filesystem benchmark for an mlfs mount. It runs only standard file operations against a target directory, so it measures the mount exactly as a workload sees it — no metadata-DB or chunk-store coupling — which lets it ship in a small standalone binary deployable onto any pod that mounts mlfs storage. It exercises the two profiles that dominate real use: one large sequential file (write-back + read-back throughput) and many small files (create/stat/read latency, i.e. the metadata path).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Dir string // parent directory (under the mount); a temp work dir is created here
BigSize int64 // total bytes for the large-file phase
BlockSize int // I/O block size for the large-file phase
SmallFiles int // number of small files for the metadata phase
SmallSize int // bytes per small file
Fsync bool // fsync after each write (measure the durable path)
DropCache bool // fadvise DONTNEED before the read phase (force a cold read)
Keep bool // keep the work dir instead of removing it
Timeout time.Duration // overall deadline (0 = none)
}
Config controls a benchmark run. Bind it to a flag set with Flags.
type Result ¶
type Result struct {
WorkDir string `json:"work_dir"`
BigBytes int64 `json:"big_bytes"`
WriteSeconds float64 `json:"write_seconds"`
ReadSeconds float64 `json:"read_seconds"`
WriteMiBps float64 `json:"write_mibps"`
ReadMiBps float64 `json:"read_mibps"`
SmallFiles int `json:"small_files"`
SmallSize int `json:"small_size"`
CreateSeconds float64 `json:"create_seconds"`
StatSeconds float64 `json:"stat_seconds"`
ReadSeconds2 float64 `json:"small_read_seconds"`
CreateIOPS float64 `json:"create_iops"`
StatIOPS float64 `json:"stat_iops"`
ReadIOPS float64 `json:"small_read_iops"`
Fsync bool `json:"fsync"`
}
Result holds the measured throughput and rates of one run.