1 |
Apparently, though unproven, at 18:31 on Friday 19 November 2010, Paul Hartman |
2 |
did opine thusly: |
3 |
|
4 |
> On Fri, Nov 19, 2010 at 9:17 AM, Alan McKinnon <alan.mckinnon@×××××.com> |
5 |
wrote: |
6 |
> > Hi all, |
7 |
> > |
8 |
> > Haven't had much luck finding this info: |
9 |
> > |
10 |
> > If I reboot this machine and start KDE, Nepomuk starts a rather |
11 |
> > long-lived index of my home directory. It takes up about 30-40% cpu and |
12 |
> > lasts as much as 15 minutes sometimes. This is annoying because after a |
13 |
> > reboot I usually want to catch up on mail, rss feeds and fire up |
14 |
> > VirtualBox. So nepomuk is just wasting my time at this point. |
15 |
> |
16 |
> My /guess/ is that it scans every time you restart to be sure nothing |
17 |
> changed while it was shutdown. It doesn't know if you've dual-booted, |
18 |
> logged into xfce, mounted the disk in another machine, had fsck remove |
19 |
> files, etc. |
20 |
> |
21 |
> I think Tracker behaves the same way in gnome-land. |
22 |
|
23 |
I think that's a bit silly, so do a full scan just in case stuff changed. |
24 |
|
25 |
If so, a very simple optimization would be to calculate a hash of some aspect |
26 |
of a directory, store the hash persistently, and only do a full scan if the |
27 |
hash is different. |
28 |
|
29 |
I haven't read the code, so I'm in no real position to know how it's done or |
30 |
how to optimize it. |
31 |
|
32 |
> > How does nepomuk know when to do it's thing, how can I tweak what it does |
33 |
> > and how can I discover why it feels it necessary to reindex my entire |
34 |
> > maildir when surely it has a perfectly valid index already from just |
35 |
> > before I shut down? |
36 |
> |
37 |
> I am pretty sure it is tied to your KDE user session, and not running |
38 |
> as a system daemon in the background. Perhaps you can suspend it via |
39 |
> some autostarting script, and then resume it after whatever amount of |
40 |
> time you're comfortable with. |
41 |
> |
42 |
> Looking in here: |
43 |
> http://api.kde.org/4.5-api/kdebase-runtime-apidocs/nepomuk/html/classNepomu |
44 |
> k_1_1IndexScheduler.html |
45 |
> |
46 |
> In the indexing speed settings, it says: |
47 |
> " |
48 |
> enum Nepomuk::IndexScheduler::IndexingSpeed |
49 |
> |
50 |
> Enumerator: |
51 |
> FullSpeed Index at full speed, i.e. do not use any artificial |
52 |
delays. |
53 |
> This is the mode used if the user is "away". |
54 |
> |
55 |
> ReducedSpeed Reduce the indexing speed mildly. |
56 |
> This is the normal mode used while the user works. The indexer |
57 |
> uses small delay between indexing two files in order to keep the load |
58 |
> on CPU and IO down. |
59 |
> |
60 |
> SnailPace Like ReducedSpeed delays are used but they are much |
61 |
> longer to get even less CPU and IO load. |
62 |
> This mode is used for the first 2 minutes after startup to give |
63 |
> the KDE session manager time to start up the KDE session rapidly. |
64 |
> " |
65 |
> |
66 |
> So based on that, for the first 2 minutes after KDE starts it should |
67 |
> be using the least aggressive indexing speed (but indexing |
68 |
> nevertheless). |
69 |
|
70 |
Good find. Personally, I'd like it to wait for 10-20 minutes after session |
71 |
start, then just run at SnailPace period. This machine is seldom booted or |
72 |
even logged out of KDE (I suspend) so I can tolerate the wait as it's rare |
73 |
|
74 |
> (Personally I've always had all that indexing/social-semantic-desktop |
75 |
> stuff disabled completely.) |
76 |
|
77 |
Maybe I should too. But I *did* want to use this nepomuk thing myself for a |
78 |
while and see what the semantic-desktop can do for myself. It looks like it |
79 |
could be awesomely useful (like Google turned out to be awesomely useful) but |
80 |
it takes usage for real to know |
81 |
|
82 |
|
83 |
|
84 |
|
85 |
-- |
86 |
alan dot mckinnon at gmail dot com |