You are not logged in.

#1 2016-02-14 22:18:52

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,067
Website

Double Digit RAM usage, or Why Pay More?

Less is the new more.

Here's what I did:

First, disable all un-needed .services (view all .services starting on boot with `systemctl list-unit-files|grep enabled`) and set the default.target to multi-user to boot to a console login:

sudo systemctl disable anacron-resume.service anacron.service cron.service display-manager.service lightdm.service ModemManager.service NetworkManager-dispatcher.service NetworkManager.service rsyslog.service smartd.service syslog.service remote-fs.target
sudo systemctl set-default multi-user.target

Then I created a custom unit file at /etc/systemd/system/network-wireless@.service for systemd to connect to my wireless point, it looks like this one but with "/usr/bin" changed to "/sbin":
https://github.com/Head-on-a-Stick/conf … 40.service

I then made a wpa_supplicant configuration file to associate with my network:

# wpa_passphrase $SSID $PASSWORD > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf # Must be run as root! Replace $SSID with the name of the access point and replace $PASSWORD with the actual password

Started the custom unit file at boot with:

sudo systemctl enable network-wireless@wlan0

Then I installed and configured dwm and wrote this ~/.xinitrc to start it all up:

xset s 300 -dpms # screensaver
synclient vertedgescroll=1 verttwofingerscroll=0 horizedgescroll=1 horizscrolldelta=10 tapbutton1=0 tapbutton2=0 tapbutton3=0 # touchpad configuration
(conky|while read LINE;do xsetroot -name "$LINE";done) & # start the conky!
urxvtd -q -f -o # start the terminal daemon
nitrogen --restore # wallpaper o_O
exec dwm # window manager & panel

And set it to run automatically on login to the console by adding this to ~/.zprofile (~/.bash_profile if you use BASH):

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx

And reboot!
smile

Immediately after loading the desktop, ps_mem says:

 Private  +   Shared  =  RAM used       Program

120.0 KiB + 107.0 KiB = 227.0 KiB       startx
 80.0 KiB + 205.0 KiB = 285.0 KiB       sh (2)
216.0 KiB + 273.5 KiB = 489.5 KiB       xinit
276.0 KiB + 222.5 KiB = 498.5 KiB       irqbalance
820.0 KiB + 154.0 KiB = 974.0 KiB       systemd-logind
868.0 KiB + 336.5 KiB =   1.2 MiB       login
952.0 KiB + 280.5 KiB =   1.2 MiB       dbus-daemon
  1.0 MiB + 370.5 KiB =   1.4 MiB       sudo
592.0 KiB + 829.5 KiB =   1.4 MiB       (sd-pam)
  1.2 MiB + 188.0 KiB =   1.4 MiB       systemd-journald
552.0 KiB +   1.1 MiB =   1.6 MiB       tmux (2)
  1.5 MiB + 192.5 KiB =   1.7 MiB       systemd-udevd
780.0 KiB +   1.3 MiB =   2.0 MiB       dwm
  1.7 MiB + 479.0 KiB =   2.2 MiB       ntpd
  2.1 MiB + 419.0 KiB =   2.5 MiB       wpa_supplicant
  1.1 MiB +   1.9 MiB =   3.0 MiB       systemd (2)
  2.9 MiB +   1.7 MiB =   4.6 MiB       zsh5 (2)
  5.1 MiB +   1.0 MiB =   6.1 MiB       conky
 10.6 MiB +   1.9 MiB =  12.6 MiB       urxvtd
 18.0 MiB + 533.5 KiB =  18.5 MiB       Xorg
---------------------------------
                         63.8 MiB
=================================

This is a 64-bit installation with 4GiB total RAM available.

Scrot or it didn't happen:
https://forums.bunsenlabs.org/viewtopic … 843#p18843

Can you do better?

Mod Note: the functionality of this system is severely compromised and it would probably only be useful to a reclusive neckbeard...
-HoaS

Offline

#2 2016-02-15 02:17:36

mrneilypops
The BL Scrot.Moe Guy
From: luxembourg
Registered: 2015-09-30
Posts: 577
Website

Re: Double Digit RAM usage, or Why Pay More?

^Very interesting experiment.
I experimented a lot with the old Crunchbang and RAM usage under my old moniker 'chameleon' @ the 'crunchbang SUB 100 club';
http://crunchbang.org/forums/viewtopic.php?id=22197

keep up the good work cool

Offline

#3 2016-02-15 03:31:15

toobuntu
Member
Registered: 2016-01-26
Posts: 6

Re: Double Digit RAM usage, or Why Pay More?

Why set-default and reboot when you can just

sudo systemctl isolate multi-user.target

and resume graphical mode with

sudo systemctl isolate graphical.target

?

In fact, the siduction distro recommends upgrading packages (apt-get dist-upgrade) only in multi-user.target and gives these instructions in its users guide.

Offline

#4 2016-02-15 08:20:25

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Double Digit RAM usage, or Why Pay More?

HoaS, that's pretty much what i'm doing here.
i like it because it is simpler and more transparent than using a display manager.

however, RAM usage is only one aspect of many.


i will have to try what toobuntu suggests after i close the browser.

Offline

#5 2016-02-15 08:28:44

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: Double Digit RAM usage, or Why Pay More?

Apart from a sense of satisfaction, and bragging rights, are there any practical benefits of low RAM usage on modern machines?


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#6 2016-02-15 08:32:25

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,067
Website

Re: Double Digit RAM usage, or Why Pay More?

toobuntu wrote:

Why set-default and reboot when you can just

sudo systemctl isolate multi-user.target

and resume graphical mode with

sudo systemctl isolate graphical.target

Because I don't like display managers tongue

the siduction distro recommends upgrading packages (apt-get dist-upgrade) only in multi-user.target and gives these instructions in its users guide.

It is not a problem to run upgrades in Debian stable from the graphical environment wink

You can even use synaptic...
yikes

Offline

#7 2016-02-15 08:34:16

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,067
Website

Re: Double Digit RAM usage, or Why Pay More?

damo wrote:

are there any practical benefits of low RAM usage on modern machines?

Erm, no, not really.

Personally, it's more about satisfying my OCD tendencies 8)

I will *not* have processes running amok on my system mad

8o

Offline

#8 2016-02-15 10:08:07

el_koraco
Member
Registered: 2016-02-08
Posts: 307

Re: Double Digit RAM usage, or Why Pay More?

damo wrote:

Apart from a sense of satisfaction, and bragging rights, are there any practical benefits of low RAM usage on modern machines?

You can open up a Chrome incognito window and get to your porn site 0,3 seconds faster.

Offline

#9 2016-02-15 11:23:29

toobuntu
Member
Registered: 2016-01-26
Posts: 6

Re: Double Digit RAM usage, or Why Pay More?

Head_on_a_Stick wrote:

It is not a problem to run upgrades in Debian stable from the graphical environment wink
You can even use synaptic...
yikes

This is true most of the time for Debian stable, like BunsenLabs. Siduction is Debian unstable, not stable. Even on stable it is not a good idea when X needs upgrading.

Offline

#10 2016-02-15 21:14:31

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 2,612

Re: Double Digit RAM usage, or Why Pay More?

Interesting.

Now if you can just find a way to get your battery information, time, and date that uses less memory than conky.

Last edited by PackRat (2016-02-15 23:24:04)


You must unlearn what you have learned.
    -- yoda

Offline

#11 2016-02-15 21:20:14

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: Double Digit RAM usage, or Why Pay More?

PackRat wrote:

Interesting.
Now if you can just find a way to get .....date that uses less memory than conky.

echo $(date)
notify-send "$(date)"

Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#12 2016-02-16 06:24:45

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Double Digit RAM usage, or Why Pay More?

PackRat wrote:

Now if you can just find a way to get your battery information, time, and date that uses less memory than conky.

less memory than conky? that will become difficult, esp. if it's conky-cli.
alternatives? yes.
maybe gkrellm. at least compared to graphical conky, it might even be more lightweight.
of course one can always open a lightweight terminal emulator and make it execute a script that displays the desired info.
or use habak in a script.

Offline

#13 2016-02-16 08:02:02

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,067
Website

Re: Double Digit RAM usage, or Why Pay More?

PackRat wrote:

Now if you can just find a way to get your battery information, time, and date that uses less memory than conky.

Indeed.

A simple shell script that parses /proc can be used instead of conky and a custom C script would be the optimal solution.

Offline

#14 2016-02-16 15:02:55

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 2,612

Re: Double Digit RAM usage, or Why Pay More?

^ pretty sure that's what unia always did with his dwm setup.


You must unlearn what you have learned.
    -- yoda

Offline

#15 2016-02-16 15:10:27

Unia
Octo-portal-pussy
From: Stockholm, Sweden
Registered: 2015-09-17
Posts: 355
Website

Re: Double Digit RAM usage, or Why Pay More?

PackRat wrote:

^ pretty sure that's what unia always did with his dwm setup.

https://github.com/Unia/dwmst

No longer maintained, though. However, if anyone here is interested in using it I might be able to invest some time into getting it in proper shape.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#16 2016-02-16 15:37:38

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 2,612

Re: Double Digit RAM usage, or Why Pay More?

^ I'm always interested in that sort of thing, but there are already some C scripts on the suckless site that display the information I would be interested in. Wouldn't want you to spend a bunch of time re-inventing the wheel. The decrease in memory use justifies going this route:

february14556367301600x900.jpg

I'll have to compile and run it on my laptop when I get a chance to see if the battery output works.

Last edited by PackRat (2016-02-16 15:38:13)


You must unlearn what you have learned.
    -- yoda

Offline

#17 2016-02-18 11:55:15

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,271
Website

Re: Double Digit RAM usage, or Why Pay More?

Head_on_a_Stick wrote:
 Private  +   Shared  =  RAM used       Program

120.0 KiB + 107.0 KiB = 227.0 KiB       startx
 80.0 KiB + 205.0 KiB = 285.0 KiB       sh (2)

HoaS mate, do you know what is sh there? i used not having this service from my early post laters i saw this "sh" on my pstree too, i don't know what it is,

Have tried turning off one by one stuff from .xinitrc, rcconf, .bashrc... I cann't localize and twig it.

I think is something from auto startx or auto login, here suspect but i'm not sure, It's been a few days that i deal and haven't found anything concrete.

Do you have any idea what is about?

Regards,
Nili


Tumbleweed | KDE Plasma

Offline

#18 2016-02-18 17:50:32

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: Double Digit RAM usage, or Why Pay More?

Nili wrote:

... i saw this "sh" on my pstree too, i don't know what it is,

It is the command interpreter (shell). Try `man sh` for info


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#19 2016-02-18 18:33:06

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,067
Website

Re: Double Digit RAM usage, or Why Pay More?

Nili wrote:

HoaS mate, do you know what is sh there? i used not having this service from my early post laters i saw this "sh" on my pstree too, i don't know what it is

In the output in the OP, it is there because the conky output is read from a loop in .xinitrc

See the `pstree` output in this post:
https://forums.bunsenlabs.org/viewtopic … 3527#p3527

Offline

#20 2016-02-19 05:59:23

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,271
Website

Re: Double Digit RAM usage, or Why Pay More?

damo wrote:

It is the command interpreter (shell). Try `man sh` for info

True but wanted to know which services use that "sh".

Head_on_a_Stick wrote:

In the output in the OP, it is there because the conky output is read from a loop in .xinitrc

See the `pstree` output in this post:
https://forums.bunsenlabs.org/viewtopic … 3527#p3527

Edit: Is not part of conky, i kill conky-cli still appears, watching the top got me here

19498 nili 2.2m S 0.0 1000 tty1 sh USER=nili XDG_SEAT=seat0 SHLVL=0 HOME=/home/nili HUSHLOGIN=FALSE LOGNAME=nili XDG_SESSION_I+ 0.6m 

this sh is part of my auto-login or auto startx probably where and i suspect.

back on the topic, haven't changed much since my last post

nili@debian

OS: Debian GNU/Linux 8 (jessie)
Uptime: 1d 20h 5m
Packages: 542
Disk: 87G / 143G
Mem: 42M / 2.0G
WM: spectrwm
Resolution: 1280x1024
Icon: Mate-Monocrom-Dark
Font: vixus 7
Terminal: rxvt-unicode
GTK Theme: T3K
Shell: /bin/bash (4.3.30)
Kernel: Linux 3.16.0-4-686-pae i686
CPU: Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz

 black  red  green  yellow  blue  magenta  cyan  white 
 black  red  green  yellow  blue  magenta  cyan  white
nili ~ $ pstree
systemd─┬─bash───urxvt───bash───pstree
        ├─dbus-daemon
        ├─login───startx───xinit─┬─Xorg
        │                        └─sh───spectrwm───conky───7*[{conky}]
        ├─systemd───(sd-pam)
        ├─systemd-journal
        ├─systemd-logind
        ├─systemd-udevd
        └─vnstatd
nili ~ $ psmem
[sudo] password for nili: 
 Private  +   Shared  =  RAM used	Program

 64.0 KiB + 131.5 KiB = 195.5 KiB	sh
 96.0 KiB + 134.5 KiB = 230.5 KiB	startx
140.0 KiB +  98.0 KiB = 238.0 KiB	vnstatd
172.0 KiB + 247.5 KiB = 419.5 KiB	xinit
632.0 KiB + 220.5 KiB = 852.5 KiB	conky
724.0 KiB + 147.5 KiB = 871.5 KiB	systemd-logind
792.0 KiB + 149.5 KiB = 941.5 KiB	systemd-udevd
660.0 KiB + 317.5 KiB = 977.5 KiB	(sd-pam)
708.0 KiB + 355.5 KiB =   1.0 MiB	login
852.0 KiB + 230.0 KiB =   1.1 MiB	dbus-daemon
896.0 KiB + 414.5 KiB =   1.3 MiB	sudo
944.0 KiB +   1.4 MiB =   2.3 MiB	spectrwm
  1.1 MiB +   1.3 MiB =   2.4 MiB	systemd (2)
  2.4 MiB + 168.0 KiB =   2.5 MiB	systemd-journald
  1.1 MiB +   1.7 MiB =   2.8 MiB	bash (2)
  7.3 MiB +   1.6 MiB =   8.9 MiB	urxvt
 10.6 MiB + 485.5 KiB =  11.1 MiB	Xorg
---------------------------------
                         38.0 MiB
=================================
nili ~ $ 

This is a simple startup/idle without basic apps running...
usually after boot/starts of WM - RAM31MB / Idle 40MB when i bloat with apps utserver, iceweasel, spacefm, terminal with lots of apps does not exceed more than 350MB.

This is a core jessie (netinst) full customized for personal usage only, with GTK2 and very less GUI apps.

Nili

Last edited by Nili (2016-02-19 06:31:10)


Tumbleweed | KDE Plasma

Offline

Board footer

Powered by FluxBB