Skip to content

Commit

Permalink
update ring entries and build profile
Browse files Browse the repository at this point in the history
  • Loading branch information
ihciah committed Nov 26, 2021
1 parent 7a9d753 commit 75a9577
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 3 deletions.
7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ members = [
"client",

"config"
]
]

[profile.release]
lto = true
debug = false
overflow-checks = false
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,21 @@ TODO: 1C/4C with 3 runtimes, different connections, watch the throughput.
## Fixed QPS
We can measure the latency and CPU utilization of different runtimes.

TODO: 1C/4C with 3 runtimes, different QPS, watch latency and CPU utilization.
TODO: 1C/4C with 3 runtimes, different QPS, watch latency and CPU utilization.

## How to run
Run diffrent servers:
```
./target/release/monoio-server --cores 1
./target/release/glommio-server --cores 1
taskset -c 1 ./target/release/tokio-server --cores 1
./target/release/monoio-server --cores 1 2 3 4
./target/release/glommio-server --cores 1 2 3 4
taskset -c 1-4 ./target/release/tokio-server --cores 1 2 3 4
```

Run client:
```
./target/release/client --target 10.0.0.0:40000 --cores 1 2 3 4 --conns-per-core 150
```
3 changes: 3 additions & 0 deletions client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ CPU slot: {}",
monoio::utils::bind_to_cpu_set(Some(cpu_)).unwrap();
let mut rt = RuntimeBuilder::new().with_entries(2560).enable_timer().build().unwrap();
rt.block_on(run_thread(count_, eps_, cfg_));
println!("Thread {} finished", cpu_);
});
}

Expand Down Expand Up @@ -122,11 +123,13 @@ async fn run_conn(
let (w, buf_w) = stream.write_all(buf).await;
if w.is_err() {
// The connection is closed.
println!("Write failed, connection exit");
return;
}
let (r, buf_r) = stream.read_exact(buf_w).await;
if r.is_err() {
// The connection is closed.
println!("Read failed, connection exit");
return;
}
let eps_ = begin.elapsed().as_micros() as u64;
Expand Down
2 changes: 1 addition & 1 deletion monoio-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn main() {
let h = std::thread::spawn(move || {
monoio::utils::bind_to_cpu_set(Some(cpu_)).unwrap();
let mut rt = RuntimeBuilder::new()
.with_entries(2560)
.with_entries(32768)
.build()
.unwrap();
rt.block_on(serve(cfg_));
Expand Down
1 change: 1 addition & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nightly

0 comments on commit 75a9577

Please sign in to comment.