Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jan 2009 14:45:29 GMT
From:      Graham Todd <gtodd@bellanet.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/131121: devel/gamin - default polling frequency increases CPU load w/ large kern.maxfiles
Message-ID:  <200901291445.n0TEjTUa073709@www.freebsd.org>
Resent-Message-ID: <200901291450.n0TEo1JX063745@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         131121
>Category:       ports
>Synopsis:       devel/gamin  - default polling frequency increases CPU load w/ large kern.maxfiles
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 29 14:50:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Graham Todd
>Release:        FreeBSD 7.1-PRERELEASE-p1 i386
>Organization:
>Environment:
FreeBSD 7.1-PRERELEASE-p1 #0: Mon Nov 24 11:49:24 UTC 2008 root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
>Description:
gam_server consumes a high level of CPU (10%) which pushes overall load quite high for a desktop system.  Even with a busy files system and many open files CPU and memory hogging should be the exclusive domain of firefox-bin ;-) ...  

This appeared on systems with gamin-0.1.10 and recent gnome upgrade. On a multi-user desktop with number testing jails a higher kern.maxfiles setting is needed. Perhaps gam_server now uses a more frequent default polling interval or the higher kern.maxfiles setting increased its workload. 

The FreeBSD gamin port/pkg does not include these files:

/.gaminrc
/usr/local/etc/gamin/gaminrc
/usr/local/etc/gamin/mandatory_gaminrc

These files can be used to tune polling frequency. 
>How-To-Repeat:
Increase kern.maxfiles to a large number (~24k here) run gam_server and then start several jails; run desktop sessions; untar and compile several large source packages - anything to make your file system busy. The application will begin to consume a large portion of CPU. 
>Fix:
Reducing gam_server's polling frequency from the default setting seems to work. I did this by creating the following files:

~/.gaminrc /usr/local/etc/gamin/gaminrc


# /usr/local/etc/gamin/gaminrc
#  
# reduce polling frequency to once per 10 seconds 
# in order to lower CPU load
fsset ufs poll 10 # all ufs mounts
fsset zfs poll 10 # does this work?


Perhaps a default /usr/local/etc/gamin/gaminrc or /usr/local/etc/gamin/mandatory_gaminrc could be included with the port that documented some of the possible configuration settings and defaults for gam_server.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901291445.n0TEjTUa073709>