Author Topic: Trimming down the fat - how to make bspwm edition lighter  (Read 2725 times)

0 Members and 1 Guest are viewing this topic.

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Trimming down the fat - how to make bspwm edition lighter
« on: 24. February 2016, 06:19:01 »
I have been trying to find ways to make this edition. It has come a long way already, because I original originally tried making a more complete desktop, and have since chosen more minimal route.

Along the way, I have dropped,among other things:
- xcfe4-settings daemon
- xfce4-panel
- xfdesktop
- spacefm daemon
- gfvs
- system tray
- nm-applet
- pulseaudio
- google-chrome/chromium/firefox

The next iso should boot with just under 100mb ram used.

However, while this is currently the lightest manjaro edition, other distros can go much lower than that. I don't want to compromize usability, so something like 60mb is not feasible, but there are still things that could be lighter.

Ideas for further trimming down the edition:
1) replace network manager.
- This is currently the biggest target for slimming, as networkmanager uses 10-15mb on its own.
- I tried replacing it with netctl, but it is too big a downgrade for usability. Netctl requires sudo to access wifi, and has been very unreliable for me. It is also much slower to connect than networkmanager.
- next thing I look into is dhcpcd-ui: https://aur.archlinux.org/packages/dhcpcd-ui/
It should come with a basic cli interface, so could be usable without systemtray
2) making the panel lighter
- currently the limepanel uses conky-cli for status info. This has advantage of being easily configurable for user, but gives extra process of 4mb.
- conky could be replaced with bash script, but it would need be less complete to keep cpu usage down. I'm thinking having just clock, battery, internet connection and volume. Volume is already separate piece that only updates when manipulated. Battery could be done with wendy or just polling every few seconds.


What do you think? Are these methods of slimming down edition a good idea? Do you know of other good ways to make it lighter?

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #1 on: 24. February 2016, 15:49:29 »
Holy shit, I tried what happens if I take down networkmanager. Something always autostarts it even though I disabled the service. To uninstall it, I also had to uninstall all my panels.

Guess what I found?

Ram usage dropped from 95-110mb to 53-60mb. So those numbers are not unreachable after all... Apparently networkmanager not only uses 7mb by itself, but also starts all kinds of other stuff, like 12mb polkitd. I really wish I could get rid of it.

I also tried wicd, but it is even heavier than networkmanager.

I'm now trying netctl. It gets me connected without problem, but I still haven't gotten it to connect to my wifi automatically. Having custom sudoers file that lets you use specific commands (netmenu, wifi-menu, netctl) without password makes it much less annoing.

Offline eugen-b

  • Support Team
  • ****
  • Posts: 3191
  • Branch: testing
  • Desktop: LXDE, Fluxbox, JWM, LXQt, bspwm
  • GPU Card: Intel 82945G/GZ
  • GPU driver: free
  • Kernel: 4.5, 4.6
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #2 on: 24. February 2016, 16:01:55 »
About wicd being even heavier, maybe because it is the only application which only requires gtk2 on your install?
But the find is impressive!
MSI Wind Nettop, Intel Atom 230 1.6GHz (64bit), 2GB RAM
DEs: NET-minimal + (LXDE / Fluxbox / JWM); LXQt OpenRC
how to install on btrfs subvolumes
http://manjaro.github.io/donate/

Offline excalibur1234

  • Global Moderator
  • *****
  • Posts: 2508
  • Branch: unstable
  • Desktop: net-minimal + LXQt
  • GPU driver: video-nouveau
  • Kernel: 4.6
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #3 on: 24. February 2016, 16:15:50 »
first a couple of questions:
did you remove gfvs or gvfs from manjaro bspwm? gvfs is used for plug-and-play of usb sticks, external hard drives, and samba shares. i find it really useful.
did you just remove it or install an alternative? how do you manage external hard drives, samba share, etc. now?


secondly, a tip:
esclapion and i have also played around with networkmanager. we tried to replace it for the same reason: it is relatively heavy.
our solution was connman (look also here: https://wiki.manjaro.org/index.php?title=Minimal_LXQt_installation#Connection_Manager). it is qt-based and lighter than networkmanager. i still use it.
but it is really hard for a community edition to use something else instead of networkmanager, because there are edge cases in which networkmanager is the best solution, e.g. wireless networks with no SSID or wireless networks, which require a unique username and password (often seen at universities). connman (and i assume other alternatives to networkmanager, too) does not work in these cases!
Need more information? Search here:   Manjaro Forum   |   Manjaro Wiki   |   Arch Wiki

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #4 on: 25. February 2016, 03:23:29 »
I'm not sure if I removed it entirely, it might just not be autostarted by default. Stuff that needs it seem to start it though, but I might have installed it somewhere along the way. For mounting removable media I use devmon. It seems to be lighter option, and popular choice among those who use ranger as their main file manager. I have no idea if it does anything for samba shares though. I have no lan, so I cannot test that (a bit like I try to develope multihead support, but have only 1 screen myself).

Yeah, I also heard that many edge cases are best covered by networkmanager. Connman is a difficult option, because I try to stay qt free, and could not figure out the cli interface.

In theory netctl should also have good support for many things, but requires much more manual intervention. I just wish I could set it up so that it would be easy to use for basic operations. But even that seems to be difficult to achieve. It seems to require:
1) enable netctl service
2) enable netctl-auto@$interface service (need to know name of the interface
3) have custom sudoers file to create and enable profiles without password
4)
Code: [Select]
sudo netctl-auto enable $profileOr choose $profile once from netmenu.

1 and 3 are easy, 2 and 4 are not, because interface name is not known beforehand, and $profile is named by user.

It is possible to get usable net connection setup with it, but it requires both more knowledge and user intervention. We would need more friendly interface for netctl for it to be feasible option.


Anyway, this slimming seems  to be largely useful for bragging rights, and little else. I tried readding limepanel without networkmanager, but it still starts polkitd, so it is still almost 100mb. And even if there is no panel, just running lxterminal starts polkitd and other stuff bringing ram usage to 120mb - where it would be with limepanel and networkmanager. If those parts are going to be ran/needed anyway, it is probably better to have them from the start, to speed up use. When not doing anything, netctl and no panel is lighter, but when actually doing anything, overhead is neglible. Weird.
« Last Edit: 25. February 2016, 04:17:29 by Chrysostomus »

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #5 on: 25. February 2016, 09:25:21 »
Okay, I concluded my experiment with dhcpd-ui. Nice tool, but in no way can it replace networkmanager.

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #6 on: 25. February 2016, 15:40:02 »
I edited limepanel to have more simple statusline and not use conky. It does make it lighter in ram usage. And makes it easier to have different colors depending on status. Bash is so much easier than lua...

Offline Jerror

  • Neuling
  • *
  • Posts: 17
  • I'm new. Be nice!
  • Branch: testing
  • Desktop: bspwm
  • GPU Card: nVidia Quadro 4000
  • GPU driver: non-free
  • Kernel: linux445-x64
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #7 on: 04. March 2016, 21:46:53 »
This is highly interesting! I've been wanting to move to Manjaro for some time now (I run Quirky linux), but have been reluctant because of the (to me) large system size and memory overhead. Perhaps I'd best build a system from manjaro-minimal up, but I lack the time...

It's very useful to know that networkmanager is one to avoid. I would have to disable it anyways. My university network is so poorly implemented in places that no extant network manager functions well, and I've been forced to disable managers and handle connection via dhcpcd and wpa_supplicant manually*; I've even found I prefer to.

Since it sounds like a difficult task, which you have thoroughly explored: could you describe how to remove networkmanager and its side-effects or provide a means to install manjaro-bspwm with networkmanager removed? I'm very impressed by your distribution, and think I'll join its users! Though I'm still hoping you'll pick up manjaro-awesome development :)


*No student has found a network manager on any system (Linux, Android, OSX, Windows...) which can reliably make a connection, and the only solution is to reset dhcpcd by hand as necessary and only run wpa_supplicant when the connection (randomly) stabilizes; which is easy to gauge heuristically by watching stdout but apparently impossible for a manager to predict. All automatic connection managers seem to attempt authentication too soon and fail, or fail authentication too many times and give up.

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #8 on: 05. March 2016, 02:40:35 »
Oh, removing networkmanager is only difficult in terms of iso building. Otherwise it is very easy: disable related services and uninstall the package. Probably the easiest way to do this is:
1) disable services (this might not even be necessary)
- run 'initmenu' in terminal
- Choose 'Disable services'
- choose with tab everything that has networkmanager in its name
- hit enter

2) uninstall networkmanager and everything that depends on it. This easy to do with pacli

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #9 on: 05. March 2016, 03:06:47 »
Also, make sure lemonpanel is at latest version. Earlier version depends on networkmanager, latest does not.

Offline Jerror

  • Neuling
  • *
  • Posts: 17
  • I'm new. Be nice!
  • Branch: testing
  • Desktop: bspwm
  • GPU Card: nVidia Quadro 4000
  • GPU driver: non-free
  • Kernel: linux445-x64
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #10 on: 25. March 2016, 21:53:43 »
Thanks! I finally had the chance to install manjaro-bspwm (16.03), and followed your instructions to remove networkmanager and co. It went very smoothly. I haven't dug in yet, but already this is my favourite OS :D

Offline Doaxan

  • Neuling
  • *
  • Posts: 33
  • I'm new. Be nice!
  • Branch: unstable
  • Desktop: Manjaro i3, Bspwm
  • GPU Card: Intel HD4000 + Nvidia GTX660M
  • GPU driver: non-free
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #11 on: 26. March 2016, 11:20:01 »
This of course is great for those who have a small amount of RAM, but it would be desirable that the distribution was made for convenience and performance in the first place.
« Last Edit: 26. March 2016, 11:27:43 by Doaxan »

Offline Chrysostomus

  • Maintainer
  • ***
  • Posts: 1634
  • Neckbeards are cool
    • Git
  • Branch: unstable
  • Desktop: Gnome, bspwm
  • GPU Card: Intel HD4000
  • GPU driver: free
  • Kernel: linux44-x64
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #12 on: 26. March 2016, 12:32:45 »
By "this" do you refer to thread title or removing networkmanager? If latter, no worries, networkmanager stays default if there is no equslly functional replacement (currently there is not).

If the former, I would like to point out that lightness equals performance on medium and low ram systems. For highend system, it is more complicated of course.

Anyway, I would be interested to hear your suggestions to reach the goals you mentioned. I'm open to new ideas if there is interest in the community.

Offline eugen-b

  • Support Team
  • ****
  • Posts: 3191
  • Branch: testing
  • Desktop: LXDE, Fluxbox, JWM, LXQt, bspwm
  • GPU Card: Intel 82945G/GZ
  • GPU driver: free
  • Kernel: 4.5, 4.6
  • Skill: Intermediate
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #13 on: 26. March 2016, 13:41:44 »
This of course is great for those who have a small amount of RAM, but it would be desirable that the distribution was made for convenience and performance in the first place.
Well, there is place for Manjaro spins who explicitly targer low RAM systems, imho. Users who want more easy to use features can install KDE, can't they?
MSI Wind Nettop, Intel Atom 230 1.6GHz (64bit), 2GB RAM
DEs: NET-minimal + (LXDE / Fluxbox / JWM); LXQt OpenRC
how to install on btrfs subvolumes
http://manjaro.github.io/donate/

Offline tanaymkis

  • Jr. Mitglied
  • **
  • Posts: 72
  • I'm new. Be nice!
  • Branch: Stable
  • Desktop: i3
  • Kernel: 3.18.22-1-MANJARO i686
  • Skill: Novice
Re: Trimming down the fat - how to make bspwm edition lighter
« Reply #14 on: 26. March 2016, 13:55:14 »
Well, there is place for Manjaro spins who explicitly targer low RAM systems, imho. Users who want more easy to use features can install KDE, can't they?

If I am correct, the bspwm spin is also targeted at newbies who want to try bspwm/tiling WMs.