Bug 194861

Summary: nepomukstorage hogs CPU with lots of deleteEntries messages
Product: [Unmaintained] nepomuk Reporter: Gökçen Eraslan <gokcen.eraslan>
Component: generalAssignee: Sebastian Trueg <sebastian>
Status: RESOLVED DUPLICATE    
Severity: normal CC: sigmund.lahn, trueg
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Gökçen Eraslan 2009-06-01 12:26:51 UTC
Version:            (using KDE 4.2.3)
Compiler:          gcc 4.3.3 
OS:                Linux
Installed from:    Unspecified Linux

At /home/hede/2008 I was keeping my SVN checkouts, about ~700M and ~25000 text (python and xml) files. Some time later, strigi has indexed all those files and I could use nepomuk & strigi to access those via krunner etc. and everything was fine. But today I've realized that "nepomukservicestub nepomukstorage" uses ~90% CPU and fan is always working. Thousands of lines like below are printed to .xsession-errors.

I think the reason is that, after I've moved my SVN checkouts to some different directory in $HOME, nepomuk tries to delete no more valid entries from index. There should be more CPU friendly way for this deletion process.

[/usr/kde/4/bin/nepomukservicestub] deleteEntries query: "select ?g ?mg where { { { ?r <http://freedesktop.org/standards/xesam/1.0/core#url> "/home/hede/2008/devel/desktop/kde/konversation/translations.xml"^^<http://www.w3.org/2001/XMLSchema#string> . } UNION { ?r <http://freedesktop.org/standards/xesam/1.0/core#url> <file:///home/hede/2008/devel/desktop/kde/konversation/translations.xml> . } } . ?g <http://www.strigi.org/fields#indexGraphFor> ?r . OPTIONAL { ?mg <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#coreGraphMetadataFor> ?g . } }"
[/usr/kde/4/bin/nepomukservicestub] deleteEntries query: "select ?g ?mg where { { { ?r <http://freedesktop.org/standards/xesam/1.0/core#url> "/home/hede/2008/devel/desktop/kde/kpogre/files/kpogre.desktop"^^<http://www.w3.org/2001/XMLSchema#string> . } UNION { ?r <http://freedesktop.org/standards/xesam/1.0/core#url> <file:///home/hede/2008/devel/desktop/kde/kpogre/files/kpogre.desktop> . } } . ?g <http://www.strigi.org/fields#indexGraphFor> ?r . OPTIONAL { ?mg <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#coreGraphMetadataFor> ?g . } }"
[/usr/kde/4/bin/nepomukservicestub] deleteEntries query: "select ?g ?mg where { { { ?r <http://freedesktop.org/standards/xesam/1.0/core#url> "/home/hede/2008/devel/desktop/kde/kpogre/actions.py"^^<http://www.w3.org/2001/XMLSchema#string> . } UNION { ?r <http://freedesktop.org/standards/xesam/1.0/core#url> <file:///home/hede/2008/devel/desktop/kde/kpogre/actions.py> . } } . ?g <http://www.strigi.org/fields#indexGraphFor> ?r . OPTIONAL { ?mg <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#coreGraphMetadataFor> ?g . } }"
[/usr/kde/4/bin/nepomukservicestub] deleteEntries query: "select ?g ?mg where { { { ?r <http://freedesktop.org/standards/xesam/1.0/core#url> "/home/hede/2008/devel/desktop/kde/kpogre/files"^^<http://www.w3.org/2001/XMLSchema#string> . } UNION { ?r <http://freedesktop.org/standards/xesam/1.0/core#url> <file:///home/hede/2008/devel/desktop/kde/kpogre/files> . } } . ?g <http://www.strigi.org/fields#indexGraphFor> ?r . OPTIONAL { ?mg <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#coreGraphMetadataFor> ?g . } }"
[/usr/kde/4/bin/nepomukservicestub] deleteEntries query: "select ?g ?mg where { { { ?r <http://freedesktop.org/standards/xesam/1.0/core#url> "/home/hede/2008/devel/desktop/kde/kpogre/pspec.xml"^^<http://www.w3.org/2001/XMLSchema#string> . } UNION { ?r <http://freedesktop.org/standards/xesam/1.0/core#url> <file:///home/hede/2008/devel/desktop/kde/kpogre/pspec.xml> . } } . ?g <http://www.strigi.org/fields#indexGraphFor> ?r . OPTIONAL { ?mg <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#coreGraphMetadataFor> ?g . } }"


When I look with strace, there are millions of lines like:

pread64(21, "\0\0\0001\0\0\0\0\0\6\333\370\0\0\0)\0\0\37\261\0\6\333\371\1\0\0\0\0\0\6\333"..., 2045, 6819840) = 2045
Comment 1 Sigmund Lahn 2009-09-18 23:42:50 UTC
This is confirmed on KDE 4.3.1 (arch linux). After moving a large directory, suddently a lot of "nepomukservicestub nepomukstorage"-processes appeared, with nice 0, and started eating my CPU.
Comment 2 Sebastian Trueg 2009-12-14 10:59:59 UTC

*** This bug has been marked as a duplicate of bug 180735 ***