1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-15 04:42:04 +00:00

Refine for performance

This commit is contained in:
winlin 2020-04-18 08:10:28 +08:00
parent cf52390cf2
commit 170b7453f4

View file

@ -193,16 +193,17 @@
#undef SRS_PERF_GLIBC_MEMORY_CHECK #undef SRS_PERF_GLIBC_MEMORY_CHECK
// For RTC, how many iovs we alloc for each mmsghdr for GSO. // 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. // 2 # We have two queue, cache and hotspot.
// * 4 # We have reuseport, each have msg cache queue. // * 4 # We have reuseport, each have msg cache queue.
// * (64 + SRS_PERF_RTC_GSO_IOVS * 1500) # Each message size. // * (64 + 16*SRS_PERF_RTC_GSO_MAX + SRS_PERF_RTC_GSO_IOVS * 1500) # Each message size.
// * 60000 # Total messages. // * 10000 # Total messages.
// = 715MB # For SRS_PERF_RTC_GSO_IOVS = 1 // = 197MB # For SRS_PERF_RTC_GSO_IOVS = 1
// = 1402MB # For SRS_PERF_RTC_GSO_IOVS = 2 // = 311MB # For SRS_PERF_RTC_GSO_IOVS = 2
// = 2775MB # For SRS_PERF_RTC_GSO_IOVS = 4 // = 540MB # For SRS_PERF_RTC_GSO_IOVS = 4
// = 998MB # For SRS_PERF_RTC_GSO_IOVS = 8
#if defined(__linux__) #if defined(__linux__)
#define SRS_PERF_RTC_GSO_IOVS 2 #define SRS_PERF_RTC_GSO_IOVS 4
#else #else
#define SRS_PERF_RTC_GSO_IOVS 1 #define SRS_PERF_RTC_GSO_IOVS 1
#endif #endif