Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial stats & comparison page draft #129

Merged
merged 35 commits into from
Jul 18, 2021
Merged

Initial stats & comparison page draft #129

merged 35 commits into from
Jul 18, 2021

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Jun 17, 2021

We may enhance the script a bit, e.g. it makes sense to merge root and boot disk usage, check swap file size before removing it and to have it optionally creating the HTML block required for page? 🙂

Styles in <head> will move into styles.css, but while experimenting it's easier to have it in the header for now.

@MichaIng MichaIng added the new content New website pages label Jun 17, 2021
@MichaIng MichaIng linked an issue Jun 17, 2021 that may be closed by this pull request
@MichaIng
Copy link
Owner Author

MichaIng commented Jun 17, 2021

Ideas from feedback:

  • Highlight/colour smaller (better) value, green vs red or similar, which suites colour scheme
  • Remove commands, instead make an own tile containing the commands, used for each stat, and the script as well
  • Bar charts and/or percentages to visualise comparison better
  • Make tabs OS selectors with each multiple hardware tiles
  • Use or merge OS/distro logo into tiles
  • Sort stats by importance

@MichaIng
Copy link
Owner Author

MichaIng commented Jun 24, 2021

Second feedback round:

  • Add additional column between "DietPi" and compared OS for "DietPi / " percentage as DietPi divided by compared OS.
  • Use a slightly brighter red for the "looser" and the code tags.
  • Add distro logos
  • Add all data we do already have

Bar charts are added in a dedicated round, as we need to think a little more about how to add them nicely.

@MichaIng MichaIng marked this pull request as ready for review July 8, 2021 16:58
@MichaIng
Copy link
Owner Author

Ready from my end. Please have a final look (test URL), also note the additional button in the features section below the title.

@Joulinar
Copy link
Collaborator

do we need an additional comparison for RPi OS 64bit?

@MichaIng
Copy link
Owner Author

Would be great indeed. Pinging @fpetru and @StephanStS here, so there is no doubled comparison done. I suggest the first one who actually starts doing this leaves a post here to inform the others 🙂.

@Joulinar
Copy link
Collaborator

I can do that. RPi3B+ or RPi4b 8GB?

@MichaIng
Copy link
Owner Author

RPi 4 would be better I think, as this is what most users nowadays have.

@Joulinar
Copy link
Collaborator

Joulinar commented Jul 16, 2021

Device: RPi 4 Model B (aarch64)

RPi OS 64bit

root@raspberrypi:/home/pi# . ./dietpi-distro_comparison
/ filesystem disk usage: "findmnt -nbo USED /"
1324404736 bytes
/boot filesystem disk usage: "findmnt -nbo USED /boot"
30778880 bytes
Total disk usage:
1292 MiB

Total memory usage: "free -th | mawk '/^Total:/{print $3}'"
74Mi

Number of pre-installed DEB packages: "dpkg --get-selections | wc -l"
461

Number of running processes: "echo $(( $(pstree -Ta | wc -l) - 3 ))" (minus echo, pstree and wc)
28

Boot duration: "systemd-analyze | mawk '{print $(NF-1)" "$NF;exit}'"
= 18.560s

/tmp is not a tmpfs, which is bad since volatile files lead to disk I/O.

/var/log is not a tmpfs, which is bad for disk I/O, but logs are preserved on system crash.

This image comes with an SSH server pre-installed.

root@raspberrypi:/home/pi#

DietPi 64Bit

root@DietPi:~# . ./dietpi-distro_comparison
/ filesystem disk usage: "findmnt -nbo USED /"
524709888 bytes
/boot filesystem disk usage: "findmnt -nbo USED /boot"
32526848 bytes
Total disk usage:
531 MiB

Total memory usage: "free -th | mawk '/^Total:/{print $3}'"
42Mi

Number of pre-installed DEB packages: "dpkg --get-selections | wc -l"
228

Number of running processes: "echo $(( $(pstree -Ta | wc -l) - 3 ))" (minus echo, pstree and wc)
11

Boot duration: "systemd-analyze | mawk '{print $(NF-1)" "$NF;exit}'"
= 14.856s

/tmp is a tmpfs, which is good to reduce disk I/O.

/var/log is a tmpfs, which is good to reduce disk I/O, but logs are lost on system crash.

This image comes with an SSH server pre-installed.
The script was executed from within an SSH session, which increases the process count above by one, compared to a local console session.
Assure to run the script via SSH as well on other systems you want to compare.

root@DietPi:~#

@MichaIng
Copy link
Owner Author

switched to Static IP. Boot duration changed from 17.836s to 9.852s 😉

Since RPi OS most likely uses DHCP as well, I think it's fair to compare against our unmodified image with DHCP, what you think?

And to avoid two additional processes + their memory usage, could you run those test with the script sourced?

curl -sSfLO https://raw.githubusercontent.com/MichaIng/hacks/main/dietpi-distro_comparison
. ./dietpi-distro_comparison

Yes it reboots on first execution intentionally to assure that everything is at a clean state and new kernel loaded after APT upgrade, in case.

@Joulinar
Copy link
Collaborator

ok will run the script again, flashing RPi OS 64bit atm

@MichaIng
Copy link
Owner Author

Okay, before you flash back and forth, I think it's fine when you run the script on RPi OS just the same way (curl | bash pipe). Thanks to GitHub edit memory, also the old boot time with DHCP is still there 🙂. Most importantly both distros are tested the same way, whether there is one expected process more or less is then not so important IMO, when it's the same on both.

@Joulinar
Copy link
Collaborator

Joulinar commented Jul 16, 2021

I have too many free SD card since I switched to USB boot for my testing devices 🤣

Will run both the same way and update the original post with both results

EDIT
done ✔️

@MichaIng
Copy link
Owner Author

I'll merge this now.

@MichaIng MichaIng merged commit 8c768d8 into dev Jul 18, 2021
@MichaIng MichaIng deleted the dev-MichaIng-stats branch July 18, 2021 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new content New website pages
Projects
None yet
3 participants