News/Journal
bsda2: pkg_validate Performance Tweaks
I am currently updating the bsda2 code for pkg_validate
with
LST.sh, this adds some overhead (however small) and to counter
that I decided to try tweak the performance a little.
Two approaches have shown benefits.
bsda2: Presenting LST.sh - A Portable Shell Array Library
Unlike the Bourne-Again Shell, the FreeBSD Almquist Shell does not have native array support. So for bsda2 I have largely resolved to storing data in strings, using the Line Feed character as a separator. Over time I have established best practices for working with these strings, which some time last year I decided to put into a small library - LST.sh. And like any small project its exploded in my face …
bsda2: 0.3.0 Release, the Return of pkg_validate
The 0.3.0 release of bsda2 reintroduces the pkg_validate
command, providing the same functionality as running
pkg check -s
(see [pkg-check(8)
]). The first BSD Administration
Scripts collection provided pkg_validate
, because at the time this
functionality was missing. With bsda2 this was considered obsolete,
but given the current state of multi core computing and fast SSDs
there is an opportunity for significant performance gains.
Embedded C++: Singletons
I develop C++ code for embedded devices, my work recently inspired me to start what hopefully will become an embedded C++ miniseries.
C++: Sane Shift Operators
Bitwise shift operators in C++ are wrought with perils. Undefined behaviour awaits those shifting negative integers or shifting too far, shifting by a negative number is implementation defined, which means the compiler cannot just pretend it didn’t happen or format your hard drive, but you still don’t have any guarantees about what exactly you get.
Article Update
Due to the KMS VT drivers, I added sysctl kern.vt.suspendswitch=0
to the
geli suspend/resume
article.
bsda:obj: Object Oriented Programming Dos and Don'ts
Once upon a time I wrote an OOP framework for shell scripts and in
2010 I even presented it at EuroBSDCon. Originally I was
going to use bsda:obj, the OOP shell scripting framework, to rewrite
the bsdadminscripts
. By now they have been rotting, mostly long
obsolete and abandoned, on sourceforge.
However a couple of the tools therein remain popular, which finally
got me to recode and release them. Post-release I’ve
started cleaning up bsda:obj
so I would like to share a couple of
lessons I’ve learned and applied over the years.
Project Docs Rollout
I have started rolling out project documentation on GitHub Pages.
This far for the powerd++
and the hsk-libs
project. The documentation
is generated using Doxygen. For the time being I am not currently
planning on covering more projects, at least until I make a significant
release.
33C3 BSD Assembly
The idea of having a BSD assembly at the 33C3 had been spreading through the community for a while. Things got real when H² shouted out to a couple of people via twitter. The elusive erdgeist was first to register the assembly. Ironically the only time I talked to him was after his talk. I don’t think he ever showed up at the assembly.
Type Decay, Bruce Dawson's Blog and a Mistake
This post is about why you should read Bruce Dawson’s blog, how an error crept into my last article and what the two have to do with each other.
C++: printf Style Formatting
The native way of formatting an std::string
using the C++ standard
library is creating an std::ostringstream
and streaming the formatting
flags and data into it. This can lead to surprisingly elegant solutions,
but often it is rather clunky.
For theses cases this article describes a simple abstraction for
snprintf(3)
, lifting it from an archaic C interface to something
that looks and feels like proper C++.
The Layout Evolves
A couple of days ago I published an article about my jekyll/Liquid tagging system for this site. Writing about this blog, that I made to write about other things, usually begets some changes.
A Tags Page for Jekyll
The jekyll site generator used for this blog as part of the GitHub Pages hosting service offers a simple tagging mechanism. What it does not offer is generating tag pages that show all the content with a specified tag.
FSAE: Securing Sponsoring for Your Team
This post was triggered by a question in the LinkedIn FSAE group. After writing 5 posts in response (due to the comment length limitaitons) I finally concluded that this topic is worth some blog space. This has been written for Formula Student Automotive Engineering teams, but a lot of it is applicable to anyone trying to secure sponsoring for something.
powerd++: Even Better After EuroBSDcon
To create my slides for EuroBSDcon 2016, I produced a number
of graphs to illustrate the positive effects of using a low pass
filter to mitigate the noise problem powerd
is so suceptible to.
Load recording and replay were the critical tools I developed
to show this. A side effect of being able to perform load replays
was the ability to create and test arbitrary loads.
EuroBSDcon Slides Released
EuroBSDcon 2016 is over. It was an
amazing event and I loved the engaging audience attending my talk.
I’d like to use this opportunity to thank Yamagi for providing me
with some real server loads up to ncpu=40
.
Reproducing Loads for EuroBSDcon
On Sunday the 25th of September I will talk about
powerd++
at the EuroBSDcon 2016.
I have already provided plenty of materials about how and why I think
powerd++
is better than powerd
. But on the conference I want to
do the proper thing and provide reproducible measurements and metrics
to quantify what better actually means.
The C++ Standard Requires Proprietary Language Extensions
The C++
standard consists of two parts. The language and the library.
The latter is built upon the first, or so I thought.
Building a Cross Device Site
This isn’t the fanciest website you have or will ever have seen. But it’s a far cry from Fefes Blog and still loads fast and renders reasonably on all devices I could get my hands on. This is not an accident and I’d like to explain the how and why of it.
Move Completed
I just decided not to move the SIGWINCH
related articles over from
the old blog. The topic is good for a nice article about subtle
incompatibilities and unexpected execution paths in software. But
the articles that are there are just not well developed.
Race to the Finish Line
All articles from and before 2015 have been moved over and converted to the new format, now. Some of them have been improved significantly on the way.
On The Move
The transfer from my Blogger page is in progress. Because I’m manually converting content from HTML to markdown, it takes its time. I haven’t gotten far, but I updated the article on suspend/resume with with full disk encryption.
powerd++: Better CPU Clock Control for FreeBSD
Setting of P-States (power states a.k.a. steppings) on FreeBSD is
managed by powerd(8)
. It has been with us since 2005, a time when
the Pentium-M single-core architecture was the cutting edge choice
for notebooks and dual-core just made its way to the desktop.
/bin/sh: Writing Your Own watch Command
The command watch
in FreeBSD has a completely different function
than the popular GNU-command with the same name. Since I find the
GNU-watch
convenient I wrote a short shell-script to provide that
functionality for my systems. The script is a nice way to show off
some basics as well as some advanced shell-scripting features.
/bin/sh: Using Named Pipes to Talk to Your Main Process
You want to fork off a couple of subshells and have them talk back to your main Process? Then this post is for you.
Another day in my love affair with AWK
I consider myself a C/C++ developer. Right now I am embracing C++11 (I wanted to wait till it is actually well supported by compilers) and I am loving it.
AWK Reloaded
Last year I
compared the performance of 3 AWK interpreters,
NAWK, GAWK and MAWK. For the test I used 3 of my .awk
scripts (available
under Beerware). But the data I processed with them was confidential.
Any way, NAWK won 1/3, MAWK 2/3 (with astonishing leads), GAWK was
the clear looser with abysmal performance in 2/3 tests.
geli suspend/resume with Full Disk Encryption
This article details my solution of the geli resume
deadlock. It
is the result of much fiddling and locking myself out of the file
system.
Legacy Jails on a FreeBSD 10 Tinderbox
It has become customary to me to build libreoffice packages, whenever an update is available in the ports tree. The packages are published on the BSDForen.de Wiki. Recently I updated the Tinderbox host system to FreeBSD 10.
Dan Heaton Releases Revolution One
Five days ago, legendary unicyclist, Dan Heaton released Revolution One. Revolution One is not your common unicycling video like UNiVERSE or defect. Instead it delivers a story about Off-Road and Street unicycling from the 80s to this day. It covers the popular riders like Kris Holm and Dan Heaton himself as well as people who are only well-known within the community, like John Foss.
AWK Text Processing Speed
My default brand of AWK is the One-True-AWK also known as NAWK, coming with FreeBSD. For portability I have started supporting GNU AWK (henceforth GAWK). Because I work with people using Ubuntu, MAWK also made it into my list recently.