1.6.3 Patch update, updated git links, added table rendering for blog posts. Added gitignore file.

This commit is contained in:
Fristi 2023-02-03 22:41:29 +01:00
parent 9f8aae63b6
commit 3b5f52ac4b
4 changed files with 132 additions and 24 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
.idea/
deploy.sh
deploy-excludes

View file

@ -0,0 +1,71 @@
# Subcon in the new year
*Written on Februari 3th, 2023*
---
In my last blog post, I discussed the roadmap for my future plans for the Subcon server. I thought it might be nice to give an update on what things have happened since then, considering quite a bunch has happened.
## Recap
As I've mentioned in my previous post, the plan was to utilize the *Odroid H3*. A lot of stuff would have to be reworked as I was essentially going to rebuild my server using all new components. That however, has been working out great so far, and I'm very glad I went with this plan.
I've mostly been able to stick to the roadmap I set up. Using LVM partitions for storage has worked great, as it allowed me to define a bunch of clear and concise partitions for home directories, software and the variable data generated by software. This made it easy to divide what goes where between the NVMe drive and the sata ssd. Good news for users: home directories live on the fast NVMe ssd!
For dealing with backups, I've come up with the solution to reuse one of my old hard disk drives. For that, I've bought a drive dock, which will also let me work with other drives lying around, in case I'll need to work on them. On the weekly, I'll connect the backup drive and run my backup script, which is now powered by *Borg Backup*. So far it's been working amazingly well. The downside is that backups are manual, but I'm willing to live with that, as it hardly takes a minute of my time now.
Migration went well, albeit slow and steady. This has mostly been because of two annoyances: firstly, I could not yet fully move websites and web services while both the old and new server were working side by side. This was mainly because only one of them could be facing the internet as they were behind NAT. Proxying requests worked for most things, but some suffered from CORS-related problems. Thus, I had to wait and migrate them at once when I could forward ports to the new server. Secondly, some services were in use; they required more careful planning. Notably the old snikket service was a pain here. Testing a new prosody setup to replace it was difficult while keeping the snikket server online, due to the above-mentioned problems of being behind NAT.
In the end though, migration went almost completely without a hitch. Only migrating the akkoma database caused some concern, and ended up taking a while. Funkwhale as a service was almost entirely dropped, were it not for a little wizard help so I could properly build it on Fedora 37. Pro-tip for those trying; install Python 3.10 and don't look back.
## The new setup
The Odroid is proving to be a very functional, yet also very efficient little system. I've installed 16GB worth of G.Skill Ripjaws for memory, and one of the NVMe drives I had lying around together with a Crucial MX500 sata ssd for storage, totalling around 6TB available space. Other than that, I used one of the standard cases for the Odroid and plopped a random case fan on the top, though so far the Odroid managed to cool itself passively with no problems.
As I said before, for backups I opted to go with a drive dock, so I can hook up an old hard disk drive on a weekly basis. While manual, I've written a backup script to help me properly run incremental backups using *Borg Backup*. This also includes correctly executed database backups. I could not be happier with how well this works; while the initial backup took a while, incremental backups take *mere minutes* to complete, and are easy to maintain and work with.
My new filesystem setup has also been working very well. Rather than mounting a big media drive somewhere in `/srv/*`, I've set up resizable LVM partitions, giving me the ability to assign more space to them over time. Additionally, all partitions now mount on typical linux root directories; there are separate partitions for user home directories, software in the `/opt/` directory, and the system root directory; the `/var/` directory lives as a partition on the sata ssd. This is done to preserve writes on the more expensive NVMe drive as much as possible.
Using this strategy has been a blessing. It allows me to maintain a very standards-compliant directory structure, where I barely have to do any work on setting up custom SELinux rules and file permissions. This makes managing software on the server almost a complete non-task.
## Some stats and findings
So, the primary reason for me downsizing my server was to conserve electricity. But how has the Odroid been doing on that topic? Let's check some data and compare with the old server.
| Old server | Odroid H3 |
|:----------------------------|-----------------------------------:|
| Intel core i3-4170 (3.7GHz) | Intel Celeron N5105 (up to 2.9GHz) |
| DDR3 16GB RAM 3200MHz | DDR4 16GB G.Skill Ripjaws 3200MHz |
| 2x SATA SSD (256GB) | 1x SATA SSD (Crucial MX500 4TB) |
| 2x SATA HDD (8TB + 3TB) | 1x NVMe SSD (Crucial P5 2TB) |
| APC Back-UPS 500VA | |
The old server, basically being a desktop system, was powered by a core i3-4170 processor, clocking in at 3.7GHz. Of course, as a desktop cpu, it could never hope to match the efficiency of lower-powered cpus like the Celeron and Pentium line, but as you will see, looks can be deceiving. Keep in mind that the old server had no less than 2 hard disk drives in it. The new server has a Celeron N5105 processor instead. It's notably weaker, having a base frequency of only 2GHz, but making up with a turbo boost up to 2.9GHz. It's also notably more efficient. This system also no longer uses hard disk drives (except for the weekly backup moment), to further save on electricity. It should also be noted that it currently has no backup UPS, which I've opted to leave out. No backup power, but also no additional power draw from the UPS.
So how do they differ in terms of power consumption?
| | Old Server | Odroid H3 |
|:------------------------------|------------:|-----------:|
| Idle (< 5% cpu usage) | ~60-65Wh | ~6-7Wh |
| Under load (> 50% cpu usage) | ~80Wh | ~10-15Wh |
| Full Wack (close to 100%) | ~90Wh | ~15-18Wh |
They differ a lot. But, keep in mind: this isn't from just the cpu or the board. These are measurements of the full setup; including peripherals, power supply inefficiencies and for the old server, the additional draw of the UPS. But, all that counts for me when it comes down to the power bill, so it's included in the comparison. Suffice to say, on idle I was saving anywhere between 85-90% on power. On loads that difference is sustained; up to 80% power savings.
Now this should not be a big surprise; and it's certainly not a statistic to bash on the core i3 processor. What makes such a big difference too is leaving out the UPS, as well as no longer using hard disk drives. Factoring that in, I've did some measuring afterward to see what my old server board was doing without the excessive peripherals. This is without the hard disk drives or the ups:
| | Old board (no HDD, no UPS) | Odroid H3 |
|:------------------------------|----------------------------:|-----------:|
| Idle (< 5% cpu usage) | ~25Wh | ~6-7Wh |
| Under load (> 50% cpu usage) | ~35-45Wh | ~10-15Wh |
| Full Wack (close to 100%) | ~50Wh | ~15-18Wh |
Once again, the Odroid wins out, but the difference is substantially smaller. In the earlier readings it should be noted that the UPS adds a constant draw of about 15-20Wh. That alone is more than the Odroid uses, and why I've opted to stop using it (it wouldn't make much sense on such a low power device). But also the omission of hard disk drives makes a substantial difference; 3.5" hard disk drives should not be underestimated with how much power they can draw, especially if they cannot spin down. These readings make clear why it's as equally important to look at your peripherals when deciding to scale down on the power consumption.
## So what's next?
I personally could not be happier with my choice to move to the Odroid. It's still powerful enough to do the things I want, but being able to do it at a fraction of the electric cost feels amazing. Knowing that the whole setup now more or less uses the equivalent of a fancy LED light gives me a lot of relief, knowing that the server won't seriously contribute to the electric bill anymore.
Now that the hardware has been settled on, I can continue again with creating a comfortable server. Part of that will be to finally get going with creating a small tilde community on it. For that, I will likely be spending a lot of time writing wiki articles on how to use stuff. But besides that, also having fun using the damn server, of course.
See you later, and happy computing!

View file

@ -6,9 +6,9 @@
<title>Comfitu.re</title> <title>Comfitu.re</title>
<link href="fonts/IBM-Plex-Mono/font.css" /> <link href="fonts/IBM-Plex-Mono/font.css" />
<link href="style.css?v=1.6.2" rel="stylesheet"/> <link href="style.css?v=1.6.3" rel="stylesheet"/>
<script src="vendor/showdownjs/showdown/showdown.min.js?v=2.1.0" type="application/javascript"></script> <script src="vendor/showdownjs/showdown/showdown.min.js?v=2.1.0" type="application/javascript"></script>
<script src="script.js?v=1.6.2" type="application/javascript"></script> <script src="script.js?v=1.6.3" type="application/javascript"></script>
</head> </head>
<body> <body>
@ -25,7 +25,7 @@
<pre style="color:#c18152;"> \___\___/_|_|_|_| |_|\__|\_,_(_)_| \___|</pre> <pre style="color:#c18152;"> \___\___/_|_|_|_| |_|\__|\_,_(_)_| \___|</pre>
<pre> </pre> <pre> </pre>
</div><div style="display: inline-block; height: 48px; vertical-align: bottom;"> </div><div style="display: inline-block; height: 48px; vertical-align: bottom;">
<a href="#changelog">v1.6.1</a><br/> <a href="#changelog">v1.6.3</a><br/>
<script>comfiture.printMotd();</script><br/> <script>comfiture.printMotd();</script><br/>
</div> </div>
<div> <div>
@ -76,6 +76,15 @@
My blog posts are now hosted here! See the archive below. My blog posts are now hosted here! See the archive below.
</p> </p>
<h2>2023</h2>
<table class="blog-table">
<tr>
<td>03 Feb</td>
<td>"Subcon in the new year"</td>
<td><a href="blogs/2023/2023-02-03_subcon_in_the_new_year.md">.md</a></td>
</tr>
</table>
<h2>2022</h2> <h2>2022</h2>
<table class="blog-table"> <table class="blog-table">
<tr> <tr>
@ -94,31 +103,50 @@
<h1>Links</h1> <h1>Links</h1>
<p>These are some links to stuff that I make or endorse. Check it out!</p> <p>These are some links to stuff that I make or endorse. Check it out!</p>
<h2>Websites</h2> <h2>My websites</h2>
<table class="link-table"> <table class="link-table">
<tr> <tr>
<td style="width: 160px;"><a href="https://comfitu.re">Comfitu.re</a>:</td> <td style="width: 160px;"><a href="https://comfitu.re">Comfitu.re</a>:</td>
<td>My personal website, the one you're reading now.</td> <td>My personal website, the one you're reading now.</td>
<td><a href="https://vcs.subcon.town/fristi/comfitu.re">Source</a></td> <td><a href="https://factory.subcon.town/fristi/comfitu.re">Source</a></td>
</tr> </tr>
<tr> <tr>
<td><a href="https://subcon.town/">Subcon Town</a>:</td> <td><a href="https://subcon.town/">Subcon Town</a>:</td>
<td>My personal server and tilde community. The site lists users and services.</td> <td>My server and tilde community webpage. </td>
<td><a href="https://vcs.subcon.town/fristi/subcon.town">Source</a></td> <td><a href="https://factory.subcon.town/fristi/subcon.town">Source</a></td>
</tr> </tr>
<tr> <tr>
<td><a href="https://akkos.fritu.re/">Akko's Friture</a>:</td> <td><a href="https://archive.comfitu.re/">Media Archive</a>:</td>
<td>my personal Akkoma Fediverse instance.</td> <td>A repository of funny videos and flash animations.</td>
<td><a href="https://akkoma.dev/AkkomaGang/akkoma">Source</a></td> <td><a href="https://factory.subcon.town/fristi/media-archive-php">Source</a></td>
</tr> </tr>
<tr> <tr>
<td><a href="https://stream.comfitu.re">Comfi Stream</a>:</td> <td><a href="https://air.fritu.re">Airfryer stream</a>:</td>
<td>the place you can watch my streams.</td> <td>Sometimes I stream stuff, you can watch it here.</td>
<td><a href="https://owncast.online/">Source</a></td> <td><a href="https://owncast.online/">Source</a></td>
</tr> </tr>
</table>
<h2>Cool websites by others</h2>
<table class="link-table">
<tr>
<td style="width: 160px;"><a href="https://tilde.cafe">Tilde Café</a>:</td>
<td>One of the older tilde communities around that I took inspiration from.</td>
<td></td>
</tr>
<tr>
<td><a href="https://toast.cafe/">Toast Café</a>:</td>
<td>Cool tilde community ran by a toasted friend.</td>
<td></td>
</tr>
<tr>
<td><a href="https://craftplacer.moe/">Craftplacer.moe</a>:</td>
<td>Webdesign that screams "yes, I still <i>surf</i> the web."</td>
<td></td>
</tr>
<tr> <tr>
<td><a href="https://fediring.net/">Fediring</a>:</td> <td><a href="https://fediring.net/">Fediring</a>:</td>
<td>a classic webring used by fediverse users.</td> <td>A classic webring used by fediverse users.</td>
<td></td> <td></td>
</tr> </tr>
</table> </table>
@ -128,21 +156,21 @@
<tr> <tr>
<td style="width: 160px;"><a href="https://akkoma.dev/AkkomaGang/akkoma">Akkoma</a>:</td> <td style="width: 160px;"><a href="https://akkoma.dev/AkkomaGang/akkoma">Akkoma</a>:</td>
<td> <td>
a fork of the popular Pleroma ActivityPub server. I help with translations A fork of the popular Pleroma ActivityPub server. I help with translations
and sometimes with bug reporting. and rarely with bug reporting.
</td> </td>
</tr> </tr>
<tr> <tr>
<td><a href="https://vcs.subcon.town/fristi/pleroma-themes">Pleroma Themes</a>:</td> <td><a href="https://factory.subcon.town/fristi/pleroma-themes">Pleroma Themes</a>:</td>
<td>a collection of themes I've made for use with Pleroma/Akkoma.</td> <td>A collection of themes I've made for use with Pleroma/Akkoma.</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://vcs.subcon.town/fristi/console-writer">Console Writer</a>:</td> <td><a href="https://factory.subcon.town/fristi/console-writer">Console Writer</a>:</td>
<td>a small symfony/laravel package with improved console input/output handling.</td> <td>A small symfony/laravel package with improved console input/output handling.</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://vcs.subcon.town/fristi">Other stuff</a>:</td> <td><a href="https://factory.subcon.town/fristi">Other stuff</a>:</td>
<td>there's more on my private gitea instance. Some of it is old and abandoned though.</td> <td>There's more on my private gogs instance. Some of it is old and abandoned though.</td>
</tr> </tr>
</table> </table>
@ -170,7 +198,7 @@
<p> <p>
A copy of the Blue Oak Model License may be viewed <a target="_blank" href="LICENSE">here</a>.<br/> A copy of the Blue Oak Model License may be viewed <a target="_blank" href="LICENSE">here</a>.<br/>
Additionally, the website source code can be viewed Additionally, the website source code can be viewed
<a target="_blank" href="https://vcs.subcon.town/fristi/comfitu.re">here</a>. <a target="_blank" href="https://factory.subcon.town/fristi/comfitu.re">here</a>.
</p> </p>
<h2>Third party works</h2> <h2>Third party works</h2>
@ -211,6 +239,11 @@
</div> </div>
<div class="content-tab" id="changelog"> <div class="content-tab" id="changelog">
<h1>Changelog</h1> <h1>Changelog</h1>
<ul>
1.6.3 Patch:
<li>Fixed links pointing to the old gitea server, which has been replaced.</li>
<li>Enabled table rendering for blog articles.</li>
</ul>
<ul> <ul>
1.6.2 Patch: 1.6.2 Patch:
<li>Fixed rendering of ordered lists in blog posts.</li> <li>Fixed rendering of ordered lists in blog posts.</li>
@ -324,7 +357,7 @@
</div> </div>
<div style="text-align: right"> &copy; 2021-2022 comfitu.re. <div style="text-align: right"> &copy; 2021-2022 comfitu.re.
<a href="#copyright">License</a> <a href="#copyright">License</a>
<a target="_blank" href="https://vcs.subcon.town/fristi/comfitu.re">Source</a> <a target="_blank" href="https://factory.subcon.town/fristi/comfitu.re">Source</a>
</div> </div>
</footer> </footer>
</div> </div>

View file

@ -89,7 +89,7 @@
{ {
reader.innerHTML = "<p>Loading...</p>"; reader.innerHTML = "<p>Loading...</p>";
ajax(href, response => { ajax(href, response => {
let converter = new showdown.Converter(); let converter = new showdown.Converter({'tables': true});
reader.innerHTML = converter.makeHtml(response); reader.innerHTML = converter.makeHtml(response);
}, () => { }, () => {
reader.innerHTML = "<h1>Could not load resource.</h1> <p>An error occurred, unable to display blog post.</p>"; reader.innerHTML = "<h1>Could not load resource.</h1> <p>An error occurred, unable to display blog post.</p>";