Bug 140920 - gamin should optimize polling for multiple clients
Summary: gamin should optimize polling for multiple clients
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gamin
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-26 14:01 UTC by Peter Eddy
Modified: 2008-08-02 23:40 UTC (History)
1 user (show)

Fixed In Version: FC5
Clone Of:
Environment:
Last Closed: 2006-08-14 12:15:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Peter Eddy 2004-11-26 14:01:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0

Description of problem:
I have a huge (5K+ files), unorganized directory of photographs on /mnt/ata0/www-images, and I don't have any .gamin config, so it's
polling since it's in /mnt/*, and the log file viewed after using the SIGUSR2 signal confirms that.

I open up Konqueror (I'm using KDE) on that directory and see gam_server using 20% of one CPU, it's constantly polling. Then I open open one of the photos with Kuickshow, and use the page up/page down keys to move back and forth between images. Now gam_server's using 40% of one CPU. I open another Kwickshow and repeat the previous step and gam_server's utilization goes to 60%. Another Kwickshow, another 20% utilization.

I'm assuming Konqueror and Kwickshow are both gamin clients. Could gam_server be polling the same directory once for each client? 

Version-Release number of selected component (if applicable):
gamin-0.0.17-1.FC3

How reproducible:
Always

Steps to Reproduce:
1. See description
2.
3.
  

Actual Results:  Increased CPU utilization

Expected Results:  I've just recently upgraded from FC1 to FC3. I didn't see this escalation of CPU utilization in FC1 on the same directory. I don't remember even seeing %20 utilization. It'd be nice if gamin could optimize how it polls so that it could reuse results for multiple clients in the same directory, and perhaps reduce polling frequency on larger directories. It seems bad to have to give up 20% of my CPU just because I have a large directory open in Konqueror.

Additional info:

Comment 1 Daniel Veillard 2004-11-30 15:13:08 UTC
In general gamin does merge resources when possible, except
there was a bug about the switch to polling mode in gamin
versions up to 0.0.17, can you recheck with 0.0.18 ?
http://www.gnome.org/~veillard/gamin/downloads.html

Daniel

Comment 2 Peter Eddy 2004-12-06 22:52:47 UTC
0.0.18 didn't help, in fact it seemed worse, but 0.0.19 seems to have done the
trick, at least after about an hour of testing.

Comment 3 Daniel Veillard 2004-12-06 23:03:18 UTC
carefully avoiding g_list_append, and using only g_list_prepend
which is O(1) might be the difference,

Daniel 

Comment 4 Peter Eddy 2004-12-06 23:23:03 UTC
Hmm, sounds like this g_list thing could use a minor enhancement. In
any case, thanks very much! Sorry I didn't get a chance to try 0.0.19
earlier, I was on vacation last week.

Comment 5 Matthew Miller 2006-07-10 22:25:37 UTC
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!



Note You need to log in before you can comment on or make changes to this bug.