Pages

2013-07-15

Salix Openbox memory usage

Bliss, yes - but there is always margin for improvements.
Nothing of what follows is a showstopper - or matters very much for everyday use... BUT!

Just after writing the post about being euphoric of my new OB, I noticed how bloody lot of memory it took. Almost twice more than my two Debian OBs (230 to 110-130). Unacceptable! Cultivating an anorectic Openbox is THE sport! So I went for it and culled some more processes:

** salix-update-notifier: process tended to hang around even after session change or logouts-ins, piling additional processes up after every 2 hours, and dragging along 'sleeps' (800k a piece).
Currently, I simply added OnlyShowIn=XFCE; into its' .desktop file in /etc/xdg/autostart/ - simply to avoid it in OB. We'll see... but I think I uninstall it in near future - there isn't a lot of updates to worry about, really. They can be checked-installed manually.
** multiple 'sh /.../openbox/autostart' processes: as investigation revealed, they go with every 'sleep' in autostart. Yeah, they only took 5 megs - but still!
I remade my whole autostart without any 'sleep'... and it works totally OK (shows that copying 'authoritive' advice from web might be err...not always useful).
Also, it seems to matter what is order of started apps in autostart ... If anyone is interested, after 1,5 hour of testing in virtual terminals, I ended up with this order:
nitrogen --restore & 
compton --backend glx --vsync opengl-swc --paint-on-overlay --shadow-exclude "! name~=''" --config ~/.compton.conf & 
spacefm -d & 
tint2 -c ~/.config/tint2/.tint2launchers/tint2rcbleft & 
volumeicon & 
# next is show-hide-desktop-icon-in-systray script (from crunchbang forum) 
~/bin/showdtop.sh & 
xxkb & 
conky -c ~/.conky_ob_rc &
* About virtual terminals... There are only three agetty-s defined in Salix (F1-F3), and tty goes to F4. Bloody strange and unconvinient! Open up your /etc/inittab and add other 3, copy/paste and change numbers. Voila!
Also, 'xinit' to start virtual desktop seems to give somewhat bizarre results... What worked OK (from C+A+F2 to C+A+F8), was:
startx /usr/bin/openbox-session -- :1
** Killed wicd off. I use no wireless - so, no need to configure it. 'removed' wicd - and lost net. Did that, in terminal:
netconfig
Options there were picked like that (and of course those are specific for my situation): hostname = whatever, name of the machine
domain = local
DHCP

Reboot (/etc/rc.d/rc/inet1 eth0_start command was not doing a thing (in perceivable way)... and there appeared nothing in inet1.conf file too. Oh, and no connection.) But booting made it - a wired connection without wicd.

Now my Salix-OB uses less, but still approx 40 megs more memory than OB in Debian.
So I decided to switch from default 'huge' (all things compiled in) kernel to 'generic' (nothing in, neccessary will be added with modules). And hoped shorter boot-time and less memory use.

- Downloaded kernel-generic and modules via http://pkgs.org/slackware-14.0/slackware-x86_64/.
- Did installpkg for kernel-generic, and did not for modules - as it appeared with upgradepkg --dry-run that modules were 100% the same.
- Ran /usr/share/mkinitrd/mkinitrd_command_generator.sh, and executed the result, initrd.gz was created.
- For good measure, reinstalled nvidia drivers.
- Updated local Grub, rebooted to my Grub-master and updated that too. Generic kernel was added as last (Salix) entry. Haven't found out yet how to change it to be first (and default) boot kernel. So, probably I will simply make 06_custom file for Salix Grub.
- Rebooted and got kernel panic... ?? ... Checking grub.cfg - initrd was NOT included (and it IS neccessary for kernel-generic). Added a line:
initrd /boot/initrd.gz.
Successful boot!

But, no change in boot time (though, the text flying by is different... which can be considered 'interesting', but not as a desired result) or in desktop memory usage... So, it seems that I did something wrong. Or something.
And the moral is - you do this kernel-thing in different and right way.

No comments: