From d208697b94fdd05ca90b1916041bea4bc6095fdd Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Sat, 8 Jun 2024 21:51:24 +0200 Subject: [PATCH] docs: Document know issue of failing memadvise (#29) --- README.md | 12 ++++++++++++ breakwater/src/server.rs | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47add4c..2508baa 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. diff --git a/breakwater/src/server.rs b/breakwater/src/server.rs index 9aaa35b..99b0025 100644 --- a/breakwater/src/server.rs +++ b/breakwater/src/server.rs @@ -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::{ @@ -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