💾 Archived View for tilde.pink › ~toshi › random › wMbenchmark.gmi captured on 2024-05-10 at 13:47:32. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-06-14)

-=-=-=-=-=-=-

WARNING: this post was made while extremely unfocused. It may not be entirely readable or understandable; however, i will not fix it, so good luck ye who enter here.

I have recently moved from choosing software based on its ram & cpu usage, SLOC or minimalist design, in favor of energy consumption. It is not that these two are entirely unrelated, but it is not a simple relation. Stumpwm, being52M, gives a discharge rate of somewhere between 1.5, 1.6 and 2+ Watts, depending on the workload. It is almost as good as ratpoison; even though they probably (i haven't calculated it) have a similar consumption on average , i made some benchmarks some time ago and found that ratpoison gives the longest time before the charge percentage goes from n% to (n-2)% while doing certain tasks (mostly passive ones, like watching a music video while also having htop in another window), with sowm, 2bwm and stumpwm being close seconds.

Benchmark results:

Benchmark1

It consisted on a firefox instance displaying a GIF, with 10 tabs open + the GIF; mplayer playing yameii' baby my phone at a constant volume and in a loop; constant brightness ensured (bcos i set it up through the writing the brightness file in /sys/class/backlight etc).

==> bm-2bwm-12:35:07 <==
    ELAPSED
      07:15

==> bm-ratpoison-11:07:48 <==
    ELAPSED
      07:02

==> bm-twm-12:08:20 <==
    ELAPSED
      07:00

==> bm-cwm-11:57:33 <==
    ELAPSED
      06:55

==> bm-sowm-15:11:34 <==
    ELAPSED
      06:42

==> bm-2bwm-12:48:43 <==
    ELAPSED
      06:29

==> bm-cagebreak-11:32:47 <==
    ELAPSED
      06:07

==> bm-hikari-11:43:40 <==
    ELAPSED
      05:22

I did this benchmark after reading about the benefits of wayland over Xorg. Cagebreak and hikari, which where the only compositors i wanted to try, vastly underperformed in comparison to X11 wms. 2bwm was the less consuming one the first time i tried, but (i dont remember why i did it again) the second time it performed under more featureful wms as cwm. I didn't test stumpwm in this benchmark, because i thought a 52M binary could only mean bloat. I also didnt test dwm bcos, even though i had used it for a long time before switching to ratpoison, this time it couldnt start firefox, so yeah.

Benchmark 2

I don't remember what i used for this test; the major change. anyway, is that this time i'm actually using wayland-only programs for the wayland tests (firefox-wayland, foot terminal)(the cagebreak without foot before, was tested while the xorg-wayland translate thingy was in execution; the difference is significant, and the same can be said about hikari, which is now pretty on par with the others).

==> bm-ratpoison-20:03:21 <==
    ELAPSED
      07:39

==> bm-sowm-20:27:12 <==
    ELAPSED
      07:35

==> bm-footcagebreak-10:49:09 <==
    ELAPSED
      07:35

==> bm-mcwm-20:17:48 <==
    ELAPSED
      07:33

==> bm-tinywm-20:59:00 <==
    ELAPSED
      07:33

==> bm-cwm-20:46:15 <==
    ELAPSED
      07:31

==> bm-footcagebreak-10:31:36 <==
    ELAPSED
      07:16

==> bm-foothikari-11:03:20 <==
    ELAPSED
      06:55

==> bm-cagebreak-21:13:45 <==
    ELAPSED
      06:47

==> bm-sowm-19:55:00 <==
    ELAPSED
      06:36

ratpoison was still one of the less consuming, and as it was already my daily driver, i chose to stick with it.

Benchmark 3: ratpoison vs stumpwm

This was done significantly after the previous benchmarks; a sudden interest in emacs resulted in an interest in lisps in general, and this led me to try stumpwm, which was already in my to-try list. The test for the first and second results, consists in playing yameii' DREAM ++ music video at fullscreen and in loop. For the 3rd and 4th result, i played the same video while having an htop terminal and also a $(watch tdp) terminal (tdp is a bash script that outputs battery drainage rate at current time. It outputs the same value as powertop, but without the hassle of powertop using a lot of energy itself)


==> bm-stumpwm-00:36:15 <==
    ELAPSED (manual)
	13:03

==> bm-ratpoisonwm-00:22:11 <==
    ELAPSED (manual)
	12:26

==> bm-ratpoisonwm-11:38:43 <==
    ELAPSED
      07:42

==> bm-stumpwm-11:28:19 <==
    ELAPSED
      07:38

In the first two iterations of this test, i forgot to make the script get the elapsed time for mplayer instead of firefox (what i was doing in previous benchmarks), so i had to manually calculate the elapsed time (last modification to benchmark file minus start of the test date). We have mixed results, as in the manually calculated times, which correspond to the mplayer-only benchmark, we have stumpwm to be vastly superior to ratpoison, while in the automatically fetched benchmarks, or the mplayer+htop+watch tdp benchmark, ratpoison wins.

For now, i'm still using ratpoison while changing to stumpwm sometimes to tinker a bit. A major drawback, despite the results being overall favorable to stumpwm (almost the same consumage + more hackability), is that stumpwm cannot have super as a unique prefix key, as i do in ratpoison, without it being a major hassle (i have tried a lot of things; to execute xmodmap in .stumpwmrc, in .xinitrc, through a .Xmodmap and through -e 'blabla', deleting the bit of common lisp that binds SUPER etc and recompiling stumpwm, but nothing has taken effect. The last alternative would be to set Super to F20 in xorg.conf.d/00-keyboard.conf or a similar file, but i use Super as it is in ratpoison so i refuse to remap super in such a way).

Homepage