[Konsole-devel] [Bug 189652] Konsole scrollback history tempspace consumption

Mike Culbertson mike at xenter.net
Mon Mar 22 18:21:06 UTC 2010


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





--- Comment #4 from Mike Culbertson <mike xenter net>  2010-03-22 19:20:57 ---
Here's a data point regarding the issue that illustrates the symptom very
clearly.  Starting on a completely fresh Konsole session, here is my tmp
directory. (the path being ".kde3.5" is just an artifact of upgrades, I'm
running 4.3.4).

mculbert at iridium ~/.kde3.5/tmp-iridium  $ konsole -v
Qt: 4.5.3
KDE: 4.3.4 (KDE 4.3.4)
Konsole: 2.3.2
mculbert at iridium ~/.kde3.5/tmp-iridium  $ ls -l
total 24
drwx------ 2 mculbert users  16384 2010-03-22 10:49 .
drwx------ 8 mculbert users   8192 2010-01-08 11:23 ..
-rw------- 1 mculbert users      0 2010-03-22 10:49 konsolewZ1387.tmp
-rw------- 1 mculbert users      0 2010-03-22 10:49 konsoleUU1387.tmp
-rw------- 1 mculbert users      0 2010-03-22 10:49 konsoleAE1387.tmp
mculbert at iridium ~/.kde3.5/tmp-iridium  $


There are empty temp files, as expected.  Now, I'm going to cat a ~500K plain
text file.

mculbert at iridium ~/.kde3.5/tmp-iridium  $ ls -l ~/txt/2006-November.txt
-rw-rw-r-- 1 mculbert admins 522769 2006-12-02 00:29
/home/mculbert/txt/2006-November.txt
mculbert at iridium ~/.kde3.5/tmp-iridium  $ cat
/home/mculbert/txt/2006-November.txt
[trimmed]
mculbert at iridium ~/.kde3.5/tmp-iridium  $ ls -l
total 8840
drwx------ 2 mculbert users    16384 2010-03-22 10:51 .
drwx------ 8 mculbert users     8192 2010-01-08 11:23 ..
-rw------- 1 mculbert users    49632 2010-03-22 10:51 konsoleqr1387.tmp
-rw------- 1 mculbert users  8931600 2010-03-22 10:51 konsoleBc1387.tmp
-rw------- 1 mculbert users    12408 2010-03-22 10:51 konsoleVx1387.tmp
mculbert at iridium ~/.kde3.5/tmp-iridium  $


Now look at the temp files. catting a 510Kb file results in almost *9MB* of
temp space used.  Just for comparison, I converted the same text to a PDF:

567981 2010-03-22 10:55 /home/mculbert/txt/2006-November.pdf

And an MS-Word doc:

1334784 2010-03-22 10:56 /home/mculbert/txt/2006-November.doc

What this means is that Konsole is using 6.8 times more temp space to store
shell output than it would take if that same output was converted to an *MS
office document*.

With disk usage like this, and a bunch of active shells, it's easy to take up
huge amounts of disk space in a short period of time.  In my case, I'm still
running into disk quotas regularly exclusively because of konsole, which leads
to crashes across nearly everything running out of my home directory since apps
like Firefox can no longer write to their databases.

One last thing, I tried setting my scrollback to max, but limited (99999
lines). And this is what RAM usage did when catting that same text file
repeatedly:

Fresh start:
mculbert at iridium ~  $ ps -eo rss,args |grep konsole
22384 konsole
mculbert at iridium ~  $ cat txt/2006-November.txt

First:   34804 konsole
Second:  45948 konsole
Third:   57060 konsole
Fourth:  68164 konsole
Fifth:   79288 konsole
Sixth:   90400 konsole
Seventh: 101520 konsole
Eighth:  112636 konsole
Ninth:   113176 konsole  (mem usage plateaus here, I assume the scrollback is
full)

So, 9*510Kb == ~4.5MB of text == ~110MB of RAM, or about 1.13KB per *line* of
scrollback.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the konsole-devel mailing list