From 170b7453f4480cdfd68cec56dab7be0075a0c796 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 18 Apr 2020 08:10:28 +0800 Subject: [PATCH] Refine for performance --- trunk/src/core/srs_core_performance.hpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/trunk/src/core/srs_core_performance.hpp b/trunk/src/core/srs_core_performance.hpp index 01c6138f7..08b006c10 100644 --- a/trunk/src/core/srs_core_performance.hpp +++ b/trunk/src/core/srs_core_performance.hpp @@ -193,16 +193,17 @@ #undef SRS_PERF_GLIBC_MEMORY_CHECK // For RTC, how many iovs we alloc for each mmsghdr for GSO. -// Assume that there are 2400 clients, say, 60000 msgs in queue to send, the memory is: +// Assume that there are 3300 clients, say, 10000 msgs in queue to send, the memory is: // 2 # We have two queue, cache and hotspot. // * 4 # We have reuseport, each have msg cache queue. -// * (64 + SRS_PERF_RTC_GSO_IOVS * 1500) # Each message size. -// * 60000 # Total messages. -// = 715MB # For SRS_PERF_RTC_GSO_IOVS = 1 -// = 1402MB # For SRS_PERF_RTC_GSO_IOVS = 2 -// = 2775MB # For SRS_PERF_RTC_GSO_IOVS = 4 +// * (64 + 16*SRS_PERF_RTC_GSO_MAX + SRS_PERF_RTC_GSO_IOVS * 1500) # Each message size. +// * 10000 # Total messages. +// = 197MB # For SRS_PERF_RTC_GSO_IOVS = 1 +// = 311MB # For SRS_PERF_RTC_GSO_IOVS = 2 +// = 540MB # For SRS_PERF_RTC_GSO_IOVS = 4 +// = 998MB # For SRS_PERF_RTC_GSO_IOVS = 8 #if defined(__linux__) - #define SRS_PERF_RTC_GSO_IOVS 2 + #define SRS_PERF_RTC_GSO_IOVS 4 #else #define SRS_PERF_RTC_GSO_IOVS 1 #endif