From d4b8a57cf7a5eb2e7f9c331df83c1f3487ba3058 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 1 Mar 2021 13:14:21 +0800 Subject: [PATCH] Enable Object Cache and Zero Copy Nack by default. 4.0.77 --- README.md | 1 + trunk/conf/full.conf | 12 ++++++------ trunk/src/app/srs_app_config.cpp | 12 ++++++------ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index dd3c6629d..a9bed81fd 100755 --- a/README.md +++ b/README.md @@ -156,6 +156,7 @@ For previous versions, please read: ## V4 changes +* v4.0, 2021-03-01, Enable Object Cache and Zero Copy Nack by default. 4.0.77 * v4.0, 2021-02-28, RTC: Support high performance [Zero Copy NACK](https://github.com/ossrs/srs/commit/36ea67359e55c94ab044cee4b6a4ec901a83a287#commitcomment-47654868). 4.0.76 * v4.0, 2021-02-27, RTC: Support [Object Cache Pool](https://github.com/ossrs/srs/commit/14bfc98122bba369572417c19ebb2a61b373fc45#commitcomment-47655008) for performance. 4.0.75 * v4.0, 2021-02-12, RTC: Support [High Resolution(about 25ms) Timer](https://github.com/ossrs/srs/commit/c5d2027f9af77fc2d34a6b6ca941c0f0fbdd10c4#commitcomment-47655747). 4.0.72 diff --git a/trunk/conf/full.conf b/trunk/conf/full.conf index fa30db474..62307d2b5 100644 --- a/trunk/conf/full.conf +++ b/trunk/conf/full.conf @@ -494,8 +494,8 @@ rtc_server { # For RTP packet and its payload cache. rtp_cache { # Whether enable the RTP packet cache. - # default: off - enabled off; + # default: on + enabled on; # The cache size for rtp packet in MB, each object is about 300B.. # default: 64 pkt_size 64.0; @@ -506,8 +506,8 @@ rtc_server { # For RTP shared message and the large buffer cache. rtp_msg_cache { #Whether enable the RTP message(a large buffer) cache. - # default: off - enabled off; + # default: on + enabled on; # The cache size for message object in MB, each object is about 40B. # default: 16 msg_size 16.0; @@ -579,8 +579,8 @@ vhost rtc.vhost.srs.com { # default: on enabled on; # Whether directly use the packet, avoid copy. - # default: off - no_copy off; + # default: on + no_copy on; } # For TWCC. twcc { diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index fa16cc1aa..a0e78dec6 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -4919,7 +4919,7 @@ SrsConfDirective* SrsConfig::get_rtc_server_rtp_cache() bool SrsConfig::get_rtc_server_rtp_cache_enabled() { - static bool DEFAULT = false; + static bool DEFAULT = true; SrsConfDirective* conf = get_rtc_server_rtp_cache(); if (!conf) { @@ -4931,7 +4931,7 @@ bool SrsConfig::get_rtc_server_rtp_cache_enabled() return DEFAULT; } - return SRS_CONF_PERFER_FALSE(conf->arg0()); + return SRS_CONF_PERFER_TRUE(conf->arg0()); } uint64_t SrsConfig::get_rtc_server_rtp_cache_pkt_size() @@ -4985,7 +4985,7 @@ SrsConfDirective* SrsConfig::get_rtc_server_rtp_msg_cache() bool SrsConfig::get_rtc_server_rtp_msg_cache_enabled() { - static bool DEFAULT = false; + static bool DEFAULT = true; SrsConfDirective* conf = get_rtc_server_rtp_msg_cache(); if (!conf) { @@ -4997,7 +4997,7 @@ bool SrsConfig::get_rtc_server_rtp_msg_cache_enabled() return DEFAULT; } - return SRS_CONF_PERFER_FALSE(conf->arg0()); + return SRS_CONF_PERFER_TRUE(conf->arg0()); } uint64_t SrsConfig::get_rtc_server_rtp_msg_cache_msg_size() @@ -5251,7 +5251,7 @@ bool SrsConfig::get_rtc_nack_enabled(string vhost) bool SrsConfig::get_rtc_nack_no_copy(string vhost) { - static bool DEFAULT = false; + static bool DEFAULT = true; SrsConfDirective* conf = get_vhost(vhost); if (!conf) { @@ -5268,7 +5268,7 @@ bool SrsConfig::get_rtc_nack_no_copy(string vhost) return DEFAULT; } - return SRS_CONF_PERFER_FALSE(conf->arg0()); + return SRS_CONF_PERFER_TRUE(conf->arg0()); } bool SrsConfig::get_rtc_twcc_enabled(string vhost)