memusage via free -k test - uxterm vs xfce4-terminal

Here is a place for your projects which are not officially supported by the Porteus Team. For example: your own kernel patched with extra features; desktops not included in the standard ISO like Gnome; base modules that are different than the standard ISO, etc...
User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

memusage via free -k test - uxterm vs xfce4-terminal

Post#1 by Rava » 25 Feb 2021, 19:59

Since in older Porteus versions uxterm was called a light-on-resources terminal emulator, I put it to the test: uxterm vs xfce4-terminal.
System: Porteus 5.0rc XFCE with Xfce v4.12. I created a variant of my fx alias (fx runs free -m) called fX that runs free -k.
No other programs have been started between 25.02.2021 17:42:20 and 25.02.2021 17:42:45 but the start of:
● one uxterm and
● opening a new tab in xfce4-terminal.

the alias:

Code: Select all

guest@porteus:/mnt$ type fX
fX is aliased to `echo $(date +%d.%m.%Y\ %H:%M:%S) ____________________________________________________________;/bin/free -k'
use this to set it on your system:

Code: Select all

alias fX='echo $(date +%d.%m.%Y\ %H:%M:%S) ____________________________________________________________;/bin/free -k'
initial fX value (all these fX tests made in the same tab of an already running xfce4-terminal):

Code: Select all

guest@porteus:/mnt$ fX
25.02.2021 17:42:20 ____________________________________________________________
               total        used        free      shared  buff/cache   available
Mem:         3966852      827884     1701796       81068     1437172     2616400
Swap:        5511956           0     5511956
after starting one uxterm vX.Org 7.7.0(366)

Code: Select all

guest@porteus:/mnt fX
25.02.2021 17:42:37 ____________________________________________________________
               total        used        free      shared  buff/cache   available
Mem:         3966852      831892     1693904       81296     1441056     2612088
Swap:        5511956           0     5511956
after opening a new tab in xfce4-terminal v0.8.8

Code: Select all

guest@porteus:/mnt$ fX
25.02.2021 17:42:45 ____________________________________________________________
               total        used        free      shared  buff/cache   available
Mem:         3966852      834164     1691628       81300     1441060     2609812
Swap:        5511956           0     5511956

used value calculation: setting 827884 as zero for uxterm and 831892 as zero for xfce4-terminal:

Code: Select all

uxterm 			4008k additional used mem
xfce4-terminal		2272k additional used mem
interesting result:
a new tab in xfce4-terminal uses approx 57% of RAM compared to what one uxterm uses (and since xfce4-terminal can use tabs and has a GUI to set e.g. the font size it is more convenient to use, in my book - you need to edit /etc/X11/app-defaults/UXTerm to change the font)


So after I typed all that and closed the uxterm and closed the additional tab in xfce4-terminal a repeat of the test:

initial fX value

Code: Select all

guest@porteus:/mnt$ fX
25.02.2021 18:13:15 ____________________________________________________________
               total        used        free      shared  buff/cache   available
Mem:         3966852      888956     1630016       81916     1447880     2554048
Swap:        5511956           0     5511956
after starting one uxterm vX.Org 7.7.0(366)

Code: Select all

guest@porteus:/mnt$ fX
25.02.2021 18:13:33 ____________________________________________________________
               total        used        free      shared  buff/cache   available
Mem:         3966852      891940     1627040       81916     1447872     2551068
Swap:        5511956           0     5511956
after opening a new tab in xfce4-terminal v0.8.8

Code: Select all

guest@porteus:/mnt$ fX
25.02.2021 18:13:42 ____________________________________________________________
               total        used        free      shared  buff/cache   available
Mem:         3966852      892724     1626244       81916     1447884     2550280
Swap:        5511956           0     5511956
once again the calculation: setting 888956 as zero for uxterm and 891940 as zero for xfce4-terminal:

Code: Select all

uxterm 			2984k additional used mem
xfce4-terminal		 784k additional used mem
2nd result:
a new tab in xfce4-terminal uses approx 26% of RAM compared to what one uxterm uses.

Makes sense that a repeat gives smaller values, but only 784k additional used mem for a new xfce4-terminal is a nice low value.

Maybe I should also compare VTs (virtual terminals aka the text terminals you get when using init 3 aka multiuser non X init or "multiuser mode (default Slackware runlevel)" as /etc/inittab calls it) mem usage vs xfce4-terminal since for now xfce4-terminal is the clear winner, low-memory-usage-wise.
Cheers!
Yours Rava