[Konsole-devel] [Bug 176974] High memory consumption when using Konsole for a longer time.

Robert Knight robertknight at gmail.com
Sat Jun 6 18:20:24 UTC 2009


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





--- Comment #9 from Robert Knight <robertknight gmail com>  2009-06-06 20:20:12 ---
> Please fix this bug. With 10 tabs open an a scrollback of 30.000,
> Konsole can consume up to 800 MB (RSS). This is insane

The memory figure that is more useful is private writable memory. 
Alternatively the 'memory' figures quoted by ksysguard or gnome's system
monitor are sensible.

> 10 tabs with 30.000 lines of scrollback, each line filled with say 100
> characters, should need no more than say 10*30.000*100*2*1.5 = 85MB (if you
> allow for 16-bit characters and 50% data structure overhead)

Konsole currently uses 11 bytes per character.  2 bytes for the character, 1
for formatting/other flags and 4 for foreground color and 4 for background
color.  Plus there is a certain amount of per-line overhead - I'd guess about
~30 bytes.  Based on 30K lines of scrollback in 10 tabs with 100 characters per
line that gives 324MB of expected memory usage.  If significantly more than
that is being used there is probably a leak somewhere which requires
investigation.

Leaks aside, this could be improved a lot, obviously, but I cannot promise when
- if you want it sorted soon then get coding.

> Bug severity should be changed to "Critical".
> The definition of "Critical" is as follows:
> crashes, loss of data, severe memory leak

The severity of a bug is mostly determined by the number of times it gets
reported, reflecting the number of people it affects.  I'd imagine most people
use the default setting of 1K lines scrollback or unlimited - in which case it
does not affect them.

> Currently, using a large scrollback will lead to extended swapping periods
> or can activate the OOM who will kill one of your processes (-> data loss).

Even when the memory usage is reduced, if you have 30K lines of output that you
care about then there is still the problem that Konsole doesn't keep the output
backed up on disk anywhere.  If you close a tab or exit the shell accidentally
you will currently lose everything.  It would undoubtedly be useful if the
terminal kept a log of its output somewhere persistent but in the meantime if
you should be logging to a file or something less fragile.

-- 
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