From owner-freebsd-current@FreeBSD.ORG Wed Feb 23 13:15:46 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A330106566C; Wed, 23 Feb 2011 13:15:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 360EB8FC15; Wed, 23 Feb 2011 13:15:46 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id A2E6846B0C; Wed, 23 Feb 2011 08:15:45 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.10]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AEEC88A01D; Wed, 23 Feb 2011 08:15:44 -0500 (EST) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 23 Feb 2011 07:51:29 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <20110222215036.GA66303@freebsd.org> In-Reply-To: <20110222215036.GA66303@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201102230751.29885.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 23 Feb 2011 08:15:44 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=0.5 required=4.2 tests=BAYES_00,MAY_BE_FORGED, RDNS_DYNAMIC autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Brandon Gooch , Alexander Best , Eir Nym , Dimitry Andric , Garrett Cooper Subject: Re: Wow... (<-- blown away at performance) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Feb 2011 13:15:46 -0000 On Tuesday, February 22, 2011 4:50:36 pm Alexander Best wrote: > On Tue Feb 22 11, Brandon Gooch wrote: > > On Tue, Feb 22, 2011 at 2:31 PM, Alexander Best wrote: > > > On Tue Feb 22 11, Garrett Cooper wrote: > > >> On Tue, Feb 22, 2011 at 2:10 AM, Eir Nym wrote: > > >> > On 22 February 2011 11:15, Garrett Cooper wrote: > > >> >> I don't know what to say, but r218938 screams with flash videos > > >> >> (native Linux speed). Not sure if it's the new binutils or if it's the > > >> >> new linuxulator patches, but I can run multiple instances of youtube > > >> >> in parallel (5 total with other miscellaneous flash animation) without > > >> >> it totally lagging out Firefox/X11, and it appears to close the > > >> >> instances of firefox properly now. Hopefully this version fares better > > >> >> than r218113 did (I think I hit a kernel bug after 2 weeks uptime, > > >> >> where my system just hardlocked for no apparent reason). > > >> >> Anyhow, hope others have similar results. > > >> >> Cheers! > > >> >> -Garrett > > >> >> > > >> >> $ uname -a > > >> >> FreeBSD bayonetta.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r218938M: > > >> >> Mon Feb 21 23:10:51 PST 2011 > > >> >> gcooper@bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA amd64 > > >> > > > >> > Which FlashPlayer version do you test? Adobe has made significant > > >> > performance changes in 10.2 (from 10.1). You can search for StageVideo > > >> > performance to learn more about. Youtube already use them since 10.2 > > >> > beta > > >> > > >> linux-f10-flashplugin-10.1r102.65 . The performance increases are > > >> claimed to be "up to 85%" on the Stage Video site, but I'm seeing a > > >> more than 200% increase (now it actually scales between multiple > > >> instances, instead of croaks with one instance, tiling up and down the > > >> screen when moving the window slider for instance or switching tabs). > > >> Besides, it seems like it needs external support from the video > > >> driver, and I'm not sure that that bridge exists in the linuxulator. > > >> Also, it looks like npviewer.bin still hangs to resources on until > > >> Firefox closes (or I kill it :)..), so something still needs to be > > >> resolved there, but that isn't a regression (it's acted that way for > > >> ages), and shouldn't be too hard to do. > > > > > > i think the problem with npviewer.bin having to be killed by hand is a futex > > > issue in combination with a high number of threads. this is the output of a > > > test from darren hart's futex test suite under freebsd 9.0: > > > > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=1 > > > Result: 18622 Kiter/s > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=2 > > > Result: 15469 Kiter/s > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=3 > > > Result: 12713 Kiter/s > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=4 > > > Result: 12247 Kiter/s > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=5 > > > Result: 11814 Kiter/s > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=6 > > > Result: 13468 Kiter/s > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=8 > > > Result: 12061 Kiter/s > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=10 > > > Result: 12854 Kiter/s > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=12 > > > Result: 12999 Kiter/s > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=16 > > > Result: 12402 Kiter/s > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=24 > > > Result: 9815 Kiter/s > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=32 > > > Result: 8518 Kiter/s > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=64 > > > ERROR: Resource temporarily unavailable: pthread_create > > > Result: ERROR > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=128 > > > ERROR: Resource temporarily unavailable: pthread_create > > > Result: ERROR > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=256 > > > ERROR: Resource temporarily unavailable: pthread_create > > > Result: ERROR > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=512 > > > ERROR: Resource temporarily unavailable: pthread_create > > > Result: ERROR > > > futex_wait: Measure FUTEX_WAIT operations per second > > > Arguments: iterations=100000000 threads=1024 > > > ERROR: Resource temporarily unavailable: pthread_create > > > Result: ERROR > > > > > > cheers. > > > alex > > > > Have you found any method or workaround to mitigate this issue? > > no. i've increased the kern.threads.max_threads_per_proc value, but that had > no effect. so it seems to be a bug in the linuxulator's futex implementation. You can try http://www.freebsd.org/~jhb/patches/futex_share.patch Not sure if it will solve your issue, but it might help if multiple processes (Linux processes, not just multiple FreeBSD processes masquerading as threads in a single Linux process) are involved. -- John Baldwin