https://bugs.kde.org/show_bug.cgi?id=470382

--- Comment #4 from tagwer...@innerjoin.org ---
> ... change MemoryHigh works for me. According to status output from systemd,
> baloo just hits the memory limited by systemd ...
That was a lucky guess then :-)

> Is that possible to output a warning when baloo failed to request more memory
> as both systemd and baloo keep silence when it happened?
>From reading, baloo doesn't get an immediate failure, it just gets pressure to
release memory. The problem is that in this case baloo does need the memory (or
thinks it does)...

> But I also noticed Baloo doesn't seem to release memory after indexed.
> Except that, is possible to find what file / reason it wants to index that
> caused those high memory demand.
My working assumption has been that you are seeing the memory used for "cached"
info, the memory mapped bits of database. In the simple case, that's no
problem, when there's memory pressure, the memory will be released (and the
info read back from the disc again when called for). That's more complicated if
you are wanting to write a transaction to disc, the memory will be flagged
dirty and must be held in memory until committed. That's the way, I think, that
LMDB works..

What happens though is that, when baloo does its initial sweep through the
filesystems to build a list of what's changed and what's new, this information
is handled as a single transaction. That's an "Ouch" when you've got a very
large number of changes. There's a wonderful, eye watering example in Bug
394759 (scroll down to the 13th comment). Your note that you'd indexed over a
million files was a clue...

I'd say the

    MemoryHigh=50%

is reasonable although it's a juggling act. You want to allow baloo enough
space to do its initial indexing but it shouldn't impact the rest of the system

The proper solution here would be for baloo to split up the work in its "first
pass" and commit every 15 or 30 seconds rather than build up a single large
transaction.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to