From a8bea809d5d3e6eda60e646ffbf8a801c9b8b568 Mon Sep 17 00:00:00 2001 From: Sebastian Hofstetter Date: Fri, 6 Feb 2026 13:37:47 +0100 Subject: [PATCH] HTTP: Increase default read buffer size to 128KB Increase the default read buffer size in read_size from 64KB to 128KB. This change aligns with optimizations in Asio/SSL to reduce io_context contention and CPU utilization by allowing larger reads per operation. --- include/boost/beast/http/impl/read.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/beast/http/impl/read.hpp b/include/boost/beast/http/impl/read.hpp index f7c032496d..65a7e16aef 100644 --- a/include/boost/beast/http/impl/read.hpp +++ b/include/boost/beast/http/impl/read.hpp @@ -206,7 +206,7 @@ class read_some_op : asio::coroutine { cont_ = true; // VFALCO This was read_size_or_throw - auto const size = read_size(b_, 65536); + auto const size = read_size(b_, 128*1024); if(size == 0) { BOOST_BEAST_ASSIGN_EC(ec, error::buffer_overflow); @@ -352,7 +352,7 @@ read_some(SyncReadStream& s, DynamicBuffer& b, basic_parser& p, error do_read: // VFALCO This was read_size_or_throw - auto const size = read_size(b, 65536); + auto const size = read_size(b, 128*1024); if(size == 0) { BOOST_BEAST_ASSIGN_EC(ec, error::buffer_overflow);