diff --git a/trunk/src/core/srs_core_performance.hpp b/trunk/src/core/srs_core_performance.hpp index cbfddf1dc..6958aed4f 100644 --- a/trunk/src/core/srs_core_performance.hpp +++ b/trunk/src/core/srs_core_performance.hpp @@ -193,7 +193,15 @@ #undef SRS_PERF_GLIBC_MEMORY_CHECK // For RTC, how many iovs we alloc for each mmsghdr for GSO. -#define SRS_PERF_RTC_GSO_IOVS 4 +// Assume that there are 2400 clients, say, 60000 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 +#define SRS_PERF_RTC_GSO_IOVS 2 #endif