1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #307, set cache to about 1.4GB when clients is 2k

This commit is contained in:
winlin 2020-04-16 14:13:09 +08:00
parent bbe4b3797d
commit d906ced5c3

View file

@ -193,7 +193,15 @@
#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.
#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 #endif