正在显示
1 个修改的文件
包含
9 行增加
和
8 行删除
@@ -55,7 +55,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -55,7 +55,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
55 | // for example, system-time is 3(300ms), | 55 | // for example, system-time is 3(300ms), |
56 | // then rusage can be 3*x, for instance, 3*10=30(3s), | 56 | // then rusage can be 3*x, for instance, 3*10=30(3s), |
57 | // the meminfo canbe 30*x, for instance, 30*2=60(6s) | 57 | // the meminfo canbe 30*x, for instance, 30*2=60(6s) |
58 | -#define SRS_SYS_CYCLE_INTERVAL 100 | 58 | +// for performance refine, @see: https://github.com/winlinvip/simple-rtmp-server/issues/194 |
59 | +#define SRS_SYS_CYCLE_INTERVAL 1000 | ||
59 | 60 | ||
60 | // update time interval: | 61 | // update time interval: |
61 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_TIME_RESOLUTION_MS_TIMES | 62 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_TIME_RESOLUTION_MS_TIMES |
@@ -64,31 +65,31 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -64,31 +65,31 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
64 | 65 | ||
65 | // update rusage interval: | 66 | // update rusage interval: |
66 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_RUSAGE_RESOLUTION_TIMES | 67 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_RUSAGE_RESOLUTION_TIMES |
67 | -#define SRS_SYS_RUSAGE_RESOLUTION_TIMES 30 | 68 | +#define SRS_SYS_RUSAGE_RESOLUTION_TIMES 3 |
68 | 69 | ||
69 | // update network devices info interval: | 70 | // update network devices info interval: |
70 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_NETWORK_RTMP_SERVER_RESOLUTION_TIMES | 71 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_NETWORK_RTMP_SERVER_RESOLUTION_TIMES |
71 | -#define SRS_SYS_NETWORK_RTMP_SERVER_RESOLUTION_TIMES 30 | 72 | +#define SRS_SYS_NETWORK_RTMP_SERVER_RESOLUTION_TIMES 3 |
72 | 73 | ||
73 | // update rusage interval: | 74 | // update rusage interval: |
74 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_CPU_STAT_RESOLUTION_TIMES | 75 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_CPU_STAT_RESOLUTION_TIMES |
75 | -#define SRS_SYS_CPU_STAT_RESOLUTION_TIMES 30 | 76 | +#define SRS_SYS_CPU_STAT_RESOLUTION_TIMES 3 |
76 | 77 | ||
77 | // update the disk iops interval: | 78 | // update the disk iops interval: |
78 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_DISK_STAT_RESOLUTION_TIMES | 79 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_DISK_STAT_RESOLUTION_TIMES |
79 | -#define SRS_SYS_DISK_STAT_RESOLUTION_TIMES 60 | 80 | +#define SRS_SYS_DISK_STAT_RESOLUTION_TIMES 6 |
80 | 81 | ||
81 | // update rusage interval: | 82 | // update rusage interval: |
82 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_MEMINFO_RESOLUTION_TIMES | 83 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_MEMINFO_RESOLUTION_TIMES |
83 | -#define SRS_SYS_MEMINFO_RESOLUTION_TIMES 60 | 84 | +#define SRS_SYS_MEMINFO_RESOLUTION_TIMES 6 |
84 | 85 | ||
85 | // update platform info interval: | 86 | // update platform info interval: |
86 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_PLATFORM_INFO_RESOLUTION_TIMES | 87 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_PLATFORM_INFO_RESOLUTION_TIMES |
87 | -#define SRS_SYS_PLATFORM_INFO_RESOLUTION_TIMES 90 | 88 | +#define SRS_SYS_PLATFORM_INFO_RESOLUTION_TIMES 9 |
88 | 89 | ||
89 | // update network devices info interval: | 90 | // update network devices info interval: |
90 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_NETWORK_DEVICE_RESOLUTION_TIMES | 91 | // SRS_SYS_CYCLE_INTERVAL * SRS_SYS_NETWORK_DEVICE_RESOLUTION_TIMES |
91 | -#define SRS_SYS_NETWORK_DEVICE_RESOLUTION_TIMES 90 | 92 | +#define SRS_SYS_NETWORK_DEVICE_RESOLUTION_TIMES 9 |
92 | 93 | ||
93 | SrsListener::SrsListener(SrsServer* server, SrsListenerType type) | 94 | SrsListener::SrsListener(SrsServer* server, SrsListenerType type) |
94 | { | 95 | { |
-
请 注册 或 登录 后发表评论