<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>442453</bug_id>
          
          <creation_ts>2021-09-14 21:17:21 +0000</creation_ts>
          <short_desc>Significant amount of disk write in short time after deleting many files in monitored folder.</short_desc>
          <delta_ts>2025-02-20 17:30:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>frameworks-baloo</product>
          <component>Baloo File Daemon</component>
          <version>5.85.0</version>
          <rep_platform>Manjaro</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CONFIRMED</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.kde.org/show_bug.cgi?id=437754</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>cantfind</reporter>
          <assigned_to>baloo-bugs-null</assigned_to>
          <cc>heri+kde</cc>
    
    <cc>postix</cc>
    
    <cc>tagwerk19</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2061049</commentid>
    <comment_count>0</comment_count>
    <who name="">cantfind</who>
    <bug_when>2021-09-14 21:17:21 +0000</bug_when>
    <thetext>SUMMARY

I was deleting quite a bit of files from my home folder (not adding anything, not moving anything - deleting with ctrl+shift+del so not even moving to recycle bin). 

baloo_file process consumed about 50% of a single core, and wrote 20-100 Mega Bytes per second for at least several minutes, reaching a size of index of more than 6GB.

Not sure I can reproduce it again, though.


STEPS TO REPRODUCE
1. delete files from monitored folder, or move files to a different (unmonitored disk)?

OBSERVED RESULT

baloo_file process wrote a lot of data, and used up a lot of CPU for a while.
Even though balooctl status reported it was idle.

The balooctl status command took about half a minute to print the data, and balooctl monitor didn&apos;t show any activity while running from a different tab the status command.


EXPECTED RESULT

To not increase the index size while indexed files decrease...


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro
(available in About System)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION


here are the results of 2 subsequent runs of balooctl status:

Baloo File Indexer is running
Indexer state: Idle
Total files indexed: 199,551
Files waiting for content indexing: 0
Files failed to index: 0
Current size of index is 5.95 GiB


Baloo File Indexer is running
Indexer state: Idle
Total files indexed: 199,109
Files waiting for content indexing: 0
Files failed to index: 0
Current size of index is 6.42 GiB

Even though, the time between running these two commands was about a minute, the size of index grew by  about 500MB, while the Total files indexed number went down...

Here&apos;s the output of balooctl monitor:

Press ctrl+c to stop monitoring
File indexer is running
Idle</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061050</commentid>
    <comment_count>1</comment_count>
    <who name="">cantfind</who>
    <bug_when>2021-09-14 21:20:50 +0000</bug_when>
    <thetext>Killing the baloo_file process, and than starting indexing again &quot;fixed&quot; it - baloo_file no longer used up cpu and no longer increased the index size.

But now my index size is quite gigantic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061056</commentid>
    <comment_count>2</comment_count>
    <who name="">cantfind</who>
    <bug_when>2021-09-14 21:37:49 +0000</bug_when>
    <thetext>I was able to reproduce it again. All it takes is deleting a lot of files in Dolphin from a monitored folder. (The ones I deleted now were archived books).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061057</commentid>
    <comment_count>3</comment_count>
    <who name="">cantfind</who>
    <bug_when>2021-09-14 21:39:05 +0000</bug_when>
    <thetext>now my balooctl status reports:

Baloo File Indexer is running
Indexer state: Idle
Total files indexed: 198,471
Files waiting for content indexing: 0
Files failed to index: 0
Current size of index is 7.20 GiB</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061115</commentid>
    <comment_count>4</comment_count>
    <who name="">tagwerk19</who>
    <bug_when>2021-09-15 08:15:10 +0000</bug_when>
    <thetext>Removing entries seems to be hard...

I think that baloo_file does not &quot;batch up&quot; deletes in the same way as it batches up its content indexing. I&apos;ve tried watching with iotop. 

There seems to be a &quot;gotcha&quot; if you try to check progress with &quot;balooctl status&quot; - ref Bug 437754. Could be where you get your 6GB index...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061165</commentid>
    <comment_count>5</comment_count>
    <who name="">cantfind</who>
    <bug_when>2021-09-15 13:41:15 +0000</bug_when>
    <thetext>(In reply to tagwerk19 from comment #4)
&gt; Removing entries seems to be hard...
&gt; 
&gt; I think that baloo_file does not &quot;batch up&quot; deletes in the same way as it
&gt; batches up its content indexing. I&apos;ve tried watching with iotop. 
&gt; 
&gt; There seems to be a &quot;gotcha&quot; if you try to check progress with &quot;balooctl
&gt; status&quot; - ref Bug 437754. Could be where you get your 6GB index...

It&apos;s not just wrong reporting on balooctl... ksysguard shows a lot of writing going on in baloo_file process, and quite a bit of cpu usage too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2061166</commentid>
    <comment_count>6</comment_count>
    <who name="">cantfind</who>
    <bug_when>2021-09-15 13:42:18 +0000</bug_when>
    <thetext>RAM usage was also at ~5GB...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2062503</commentid>
    <comment_count>7</comment_count>
    <who name="">tagwerk19</who>
    <bug_when>2021-09-20 18:13:37 +0000</bug_when>
    <thetext>(In reply to cantfind from comment #0)
&gt; OBSERVED RESULT
&gt; 
&gt; baloo_file process wrote a lot of data, and used up a lot of CPU for a while.
&gt; Even though balooctl status reported it was idle.
&gt; 
&gt; The balooctl status command took about half a minute to print the data, and
&gt; balooctl monitor didn&apos;t show any activity while running from a different tab
&gt; the status command.
Flagging &quot;Confirmed&quot;...</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>