Date: Thu, 19 Apr 2001 11:02:14 +0100 (BST) From: n_hibma@qubesoft.com To: FreeBSD-gnats-submit@freebsd.org Subject: ports/26700: [PATCH] icecast gobbling up 80% of the CPU Message-ID: <200104191002.f3JA2ES59919@bluebottle.qubesoft.com>
next in thread | raw e-mail | index | archive | help
>Number: 26700 >Category: ports >Synopsis: icecast gobbling up 80% of the CPU >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Apr 19 03:10:02 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Nick Hibma >Release: FreeBSD 4.2-BETA i386 >Organization: Qube Software Ltd. >Environment: ports tree as of yesterday 2001/04/18. >Description: icecast uses 80% of the CPU without any encoders or clients connected. The problem is that it spins while waiting for incoming connections. The timout there is only 30 microseconds for select. Increasing this value to 30 seconds solves the problem with no adverse effects, bar the mt->ping not being set as often. But that should not be too big a problem. Other threads also set timeouts/sleeps for more then 5 seconds. >How-To-Repeat: >Fix: --- connection.c.orig Thu Apr 19 10:57:38 2001 +++ connection.c Thu Apr 19 10:57:32 2001 @@ -216,8 +216,8 @@ } maxport += 1; - tv.tv_sec = 0; - tv.tv_usec = 30; + tv.tv_sec = 30; + tv.tv_usec = 0; if (select(maxport, &rfds, NULL, NULL, &tv) > 0) { for (i = 0; i < MAXLISTEN; i++) { >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200104191002.f3JA2ES59919>