Bug 131121 - devel/gamin - default polling frequency increases CPU load w/ large kern.maxfiles
Summary: devel/gamin - default polling frequency increases CPU load w/ large kern.max...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-29 14:50 UTC by Graham Todd
Modified: 2009-04-16 19:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Todd 2009-01-29 14:50:01 UTC
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.

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.
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.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2009-01-29 14:50:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gnome

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Joe Marcus Clarke freebsd_committer freebsd_triage 2009-04-16 18:33:06 UTC
State Changed
From-To: open->closed

Text has been added to pkg-message on how to configure gamin.  Your UFS 
example has also been included there for users that may want it.
Comment 3 dfilter service freebsd_committer freebsd_triage 2009-04-16 18:54:01 UTC
marcus      2009-04-16 17:32:57 UTC

  FreeBSD ports repository

  Modified files:
    devel/gamin          Makefile pkg-message 
    devel/gamin/files    patch-server_gam_server.c 
  Log:
  Fix a number of long-standing bugs with gamin.
  
  * Do not use kernel notifications for paths like /mnt and /media.  This
    will allow such volumes to be unmounted.  This matches the behvaior
    of Linux.
  * Allow the "poll" directive in gaminrc files to have an effect.
  * Add some verbiage to pkg-message to instruct users how to configure
    gamin [1]
  
  PR:             131121 [1]
  Submitted by:   Graham Todd <gtodd@bellanet.org> (based on) [1]
  Reported by:    countless users
  Approved by:    portmgr (implicit)
  
  Revision  Changes    Path
  1.34      +2 -1      ports/devel/gamin/Makefile
  1.6       +12 -2     ports/devel/gamin/files/patch-server_gam_server.c
  1.2       +10 -0     ports/devel/gamin/pkg-message
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"