Skip to content

Commit

Permalink
docs: Document know issue of failing memadvise (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernauer committed Jun 8, 2024
1 parent bbef8cf commit d208697
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,17 @@ This should work the same way as streaming to owncast.
Simply uncomment the `breakwater` command and adopt `--rtmp-address` accordingly.
I never used this for a longer time period, so happy about feedback!

# Known issues

## Failed to memadvise sequential read access for buffer to kernel

During high traffic at GPN22 a few warnings where raised as breakwater was not able to memadvise the created buffer to the kernel.

This *should* not happen, as we allocate the memory area directly before but who knows.
The memadvise is only on a best-effort base, client connections while still be served even if the call fails.
The worst thing that should happen is a minimal performance degradation.
Have a look at [the issue report](https://github.com/sbernauer/breakwater/issues/28) for details.

# Performance

## Laptop
Expand All @@ -177,6 +188,7 @@ These are the results of different Pixelflut servers:
| [Breakwater](https://github.com/sbernauer/breakwater) | Rust | 30 Gbit/s | 22 Gbit/s |
## Server
As I don't have access to a dedicated server any more I did run the following benchmark on a Hetzner sever.

Server type: [`CCX62`](https://www.hetzner.com/cloud) with `48` dedicated AMD EPYC cores and `192` GB RAM.
Expand Down
4 changes: 2 additions & 2 deletions breakwater/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{cmp::min, net::IpAddr, sync::Arc, time::Duration};
use breakwater_core::framebuffer::FrameBuffer;
use breakwater_core::CONNECTION_DENIED_TEXT;
use breakwater_parser::{original::OriginalParser, Parser, ParserError};
use log::{debug, error, info};
use log::{debug, info, warn};
use memadvise::{Advice, MemAdviseError};
use snafu::{ResultExt, Snafu};
use tokio::{
Expand Down Expand Up @@ -170,7 +170,7 @@ pub async fn handle_connection(
MemAdviseError::UnalignedAddress => "UnalignedAddress",
MemAdviseError::InvalidRange => "InvalidRange",
};
error!("Failed to memadvise buffer to kernel, propably having some performance degration: {err}");
warn!("Failed to memadvise sequential read access for buffer to kernel. This should not effect any client connections, but might having some minor performance degration: {err}");
}

// Number bytes left over **on the first bytes of the buffer** from the previous loop iteration
Expand Down

0 comments on commit d208697

Please sign in to comment.