Refine for performance

pull/1748/head
winlin 5 years ago
parent cf52390cf2
commit 170b7453f4

@ -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

Loading…
Cancel
Save