From owner-freebsd-current@FreeBSD.ORG Thu Jul 28 02:12:25 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 4FC07106566B; Thu, 28 Jul 2011 02:12:25 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f11:66f:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id CFAE68FC0A; Thu, 28 Jul 2011 02:12:24 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f11:66f:1::5]) by mail.farley.org (8.14.5/8.14.5) with ESMTP id p6S2CM9T090126; Wed, 27 Jul 2011 22:12:22 -0400 (EDT) (envelope-from scf@FreeBSD.org) Date: Wed, 27 Jul 2011 22:12:22 -0400 (EDT) From: "Sean C. Farley" To: Gleb Kurtsou In-Reply-To: <20110727083339.GA12233@tops> Message-ID: References: <20110724212544.GA57733@freebsd.org> <20110725072102.GA24938@freebsd.org> <4E2D2C32.5010602@gmx.de> <20110727004850.GA63109@freebsd.org> <20110727083339.GA12233@tops> User-Agent: Alpine 2.02 (BSF 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-1.1 required=4.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.farley.org Cc: Norberto Lopes , Alexander Best , Adrian Chadd , Matthias Andree , freebsd-current@FreeBSD.org Subject: Re: chromium port causing massive I/O faults 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: Thu, 28 Jul 2011 02:12:25 -0000 On Wed, 27 Jul 2011, Gleb Kurtsou wrote: > On (27/07/2011 00:48), Alexander Best wrote: >> On Mon Jul 25 11, Matthias Andree wrote: >>> Am 25.07.2011 09:21, schrieb Alexander Best: >>>> On Mon Jul 25 11, Adrian Chadd wrote: >>>>> Is it perhaps doing disk IO using mmap? >>>> >>>> how can i check, whether that's the case or not? >>> >>> Use truss(1) for instance. >>> >>> However, unless there are *practical* problems, a high number of >>> page faults is not an indication for problems. Although it may >>> sound scary, page faults are a feature of the memory management. >> >> unfortunately truss(1) is crashing chromium :( i opened up a new >> thread reagarding this issue on freebsd-current@. > Could you try ktrace? It works for me > >> another thing i noticed is the increase in system calls caused by >> chromium. let's have a look at hub.freebsd.org: *snip* > About 2.5k syscalls with chrome + a lot of other stuff running. 1.5k > without chrome. > > Looks like there is a lot of clock_gettime and gettimeofday syscalls. > ~ % kdump -m 1 -f ktrace.out | grep 'CALL .*gettime' | wc -l > 24343 > > ~ % kdump -E -m 1 -f ktrace.out | grep 'CALL .*gettime' | tail -20 > 12747 chrome 15.077376 CALL gettimeofday(0x7fffff7f9630,0x7fffff7f9640) > 12747 chrome 15.077396 CALL clock_gettime(0x4,0x7fffffbfb6f0) *snip* > Some work was done by kib@ to create a kernel page strong current time > and other misc info to eliminate gettimeofday kind syscalls. Bits of > it were commited but I'm not sure if it was finished. But anyway > calling gettimeofday hundreds of times per second is a chrome bug. Is it Chrome or a supporting library that is making the call. I have been trying, when I have time, to track down an issue similar to this with Firefox (at least 4 and 5) that causes Xorg to run close to 100% while Firefox creates a new tab under certain circumstances. The best example is to start the Add-ons Manager, search for something such as Google in the Add-ons search box and click the "See all 1003 results" at the bottom of the results page. Xorg is busy making a large number of gettimeofday() and clock_gettime() calls amongst other calls. This is with stable/8 r223876. The window manager does not matter. At least, Fluxbox and TWM exhibit this. However, the size of the Firefox window does (close to 1680x1050). Also, the window must be the top window and not minimized. I have seen it on my system with nVidia drivers and a VirtualBox guest hosted by WinXP. I read a rumor in a forum--it must be true! ;)-- that it was Firefox updating the title of the window incessantly as the tab is created. An interesting workaround to this tab creation issue is to set browser.tabs.loadDivertedInBackground to True. It does not fix all cases. >> i ran the following command twice. first time without running >> chromium and the second time with chromium running: >> >> otaku% vmstat -s|grep "system calls"; sleep 1; vmstat -s|grep "system calls" >> 2178187850 system calls >> 2178189739 system calls >> >> otaku% vmstat -s|grep "system calls"; sleep 1; vmstat -s|grep "system calls" >> 2177998835 system calls >> 2178022003 system calls >> >> so it's 2k/sec vs. 23k/sec!!!! For my situation with Firefox, it jumps from about 2K/sec to 49K/sec. Sean -- scf@FreeBSD.org