GNOME Bugzilla – Bug 348874
permanent 100% CPU usage
Last modified: 2006-10-20 16:18:58 UTC
Please describe the problem: For some reason Beagle seems to cause 100% CPU usage on my box. I noticed this when I had taken a look on System Monitor's info. I also noticed this when I would play Quake 3, I noticed serious slowdowns and a low framerate. I figured out that the beagled process was the evildoer. http://www.svanloon.nl/beagled_100percent_1.png http://www.svanloon.nl/beagled_100percent_2.png After I killed the beagled process, I would notice the CPU usage return to a more normal value of lower than 10% according to System Monitor, when I'm not doing very much on my desktop. Quake 3 is playable for me again when beagled is killed, as well. This probably isn't enough information, so if I need to get system log output or whatever to figure out what's going on, I'd be happy to help. Steps to reproduce: I'm not certain about this, I'm just using Ubuntu 6.06 and apt-get'ted Beagle before I noticed this problem. Actual results: Expected results: Does this happen every time? Yes, System -> Administration -> System Monitor always shows beagled consuming ridiculous amounts of CPU. Other information:
Interesting find :). I'll see if I can locate any copy of quake in my shelf and test with that. A few questions: * Is this reproducible ? It better be, o/w there is little chance of fixing it. * If you put quake in some place other than your home directory (any directory which beagle isnt indexing), then does the same happen ? * Somehow fool beagle into thinking there is no X e.g. $ unset DISPLAY && beagled ... (or something else) Basically beagled pings the Xserver to see if screensaver is running. It could be that is causing the mess up. Just a possibility.
No need to use Quake, that was just an example. If I start glxgears, the animation of the gears is very slow as well because of beagled hammering my CPU. And glxgears is not located in my home dir... * No, not reproducible. * unset DISPLAY && beagled didn't work. Doesn't beagle keep logs of it's activity, which might provide insight in this problem? Because it's not reproducible, maybe I should just remove beagle from my box for the moment, and hope beagle will behave normally when I upgrade to Ubuntu 6.10 (when that's released), and close this bug?
I will try to reproduce it with glxgears then. Beagle keeps a log in ~/.beagle/Log/current-{Beagle*,IndexHelper*} Nobody ever reported anything like this and it does sound like a strange bug. We would definitely like to get this fixed, asap.
I was able to get a flavour of the bug. Beagle uses a scheduler that periodically indexes some number of files (based on system load average, screensaver status etc.). That way, beagle doesnt hog the CPU completely. What happens is when the scheduler becomes active, there is a CPU spike. Indexing is a CPU intensive job, so even if scheduler asks to index only 10 files, there is a CPU spike. On normal systems, this is not noticable but with glxgears (and Quake or other CPU intensive process with visual feedback), sudden CPU spikes for 2-3 seconds are easily noticable. I am not sure what is the right thing to do. Probably we could add some more smartness to beagle scheduler. But I dont see how to completely solve the problem.
I don't know if there is a great solution to this, but maybe we should just do (kinda) what Google does with their desktop search, give into the taskbar icon, then have a 'Pause Indexing' feature... I think in the end, no matter how intelligent we make the scheduler, nothing can top simply what the user wants, which is always going to be hard to tell. For example User A) Gamer, playing lots of system resource intensive programs on a high end machine, doesn't want beagle interfearing with that experiance. User B) Office User, lots of programs (e-mail, web, OO.org perhaps) but on a lower-end office machine. % of resources used is almost the same as user above, (because of lower-end machine) but user still wants indexing to be taking place. distingushing between those 2 users might be tough, but the gamer would have little issue with executing an extra 2 clicks to pause the daemon before a super-cpu intensive task. Just thinking aloud, maybe I completely missed the point, but yeah, my $0.02
(In reply to comment #5) > I don't know if there is a great solution to this, but maybe we should just do > (kinda) what Google does with their desktop search, give into the taskbar icon, > then have a 'Pause Indexing' feature... I think in the end, no matter how ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Work in progress.
Awesome, you've been busy lately ;)
The "pause indexing" feature is great, but if beagled is using 100% CPU for an extended period of time, there's a larger bug here. (And in fact pausing the indexing is unlikely to fix this particular problem.) Sander, can you take a look in your ~/.beagle/Log directory for any exceptions (particularly ones that happen over and over) that might be causing this? If you can find specific files or types of data that cause this to happen, that would also be very helpful.
Sorry for my late reply. I got fed up a bit with Beagle and I removed it, and then installed it again to see if that would fix it. For some reason the 100% procent CPU problem is gone now (currently it's using 0% CPU as far as I've seen for 10 minutes with GNOME System Monitor). I have examined the logs, but I didn't find anything interesting there. Sorry that I can't reproduce this anymore. My reaction on comment #5: I don't think a pause indexing feature is a very good idea because it requires the user to interact, maybe it would be better to temporarily stop indexing when it is detected that a full screen application is started?
Which process was taking all the CPU? beagled or beagled-helper? (The images are no longer up, and I don't remember.) *** This bug has been marked as a duplicate of 348139 ***
oops, didn't mean to mark this as a dup (yet).
The process eating my CPU was beagled.
Can you attach your ~/.beagle/Log directory or email it to me at joeshaw@novell.com ?
Created attachment 71956 [details] Beagle Log directory contents These are the contents of my /.beagle/Log directory, I should mention again that have not experienced the 100% CPU usage for some week now.
Terribly sorry for the delay getting back to you on this. Is the issue still there for you? The log files are timestamped; do you know about when the CPU was spinning?
No problem, however I can not reproduce the problem anymore, because since then I formatted my harddisk and did a new install of Ubuntu 6.10. Unfortunately this bug occured to me too long ago to remember a relationship between the logs and the moment of the 100% CPU load.
Crap, sorry about that. I am going to close this INCOMPLETE then, but if you see it again, please reopen the bug.