Episode 130
Store all the Things | BSD Now 130
February 24th, 2016
2 hrs 10 mins 4 secs
Tags
About this Episode
This week on BSDNow, Allan is back from the Storage Summit in Silicon Valley! We are going to get his thoughts on how the conference went, plus bring you the latest ZFS info discussed. That plus the usual BSD news is
This episode was brought to you by
Headlines
OpenBSD website operators urged to fix mind-alteringly bad bug
- We start off a bit light-hearted this week, with the important, breaking news that finally a long-standing OpenBSD bug has been addressed for the HTTP daemon.
- Specifically? It changes the default 404 page fonts away from Comic Sans, to a bit more crowd-pleasing alternative:
- “For some reason the httpd status pages (e.g. 404) use the Comic Sans typeface. This patch removes comic sans and sets the typeface to the default sans-serif typeface of the client.
- “This lowers the number of people contacting website maintainers with typeface complaints bordering on harassment”.
- Operators running HTTPD are highly encouraged to update their systems to the latest code, right now……... No seriously, we are waiting for you. Get it done now and then we’ll continue with the show.
Registration for AsiaBSDCon 2016 is now open + Talk Schedule
- After a few delays, the registration for AsiaBSDCon has now opened!
- The conference starts in less than two weeks! now, so be sure to get signed up ASAP.
- In addition the schedule has been posted, and here’s some of the highlights of this year’s conference.
- In addition to FreeBSD and NetBSD dev summits on the first two days, we have some excellent tutorials being given this year by Kirk, Gnn, Dru and more! (https://2016.asiabsdcon.org/program.html.en)
- The regular paper talks also have lots of good ones this year, including this crazy encrypted boot loader one given by our very own Allan Jude! ***
OPENBSD ON AWS : AN UNEXPECTED JOURNEY
- We have a blog post from Antoine Jacoutot, talking about the process of getting OpenBSD up and running in AWS
It starts with his process of creating an AMI from scratch, which ended up not being that bad:
- create and loopback-mount a raw image containing a UFS filesystem extract the OpenBSD base sets (which are just regular tarballs) and kernel enable console output (so that one could “aws ec2 get-console-output”)
- install the boot loader on the image then use the ec2 tools to import the RAW image to S3, convert it into a volume (ec2-import-volume) which we can snapshot (ec2-create-snapshot) and create an AMI from (ec2-register)
The blog post also has a link to a script which automates this process, so don’t be daunted if you didn’t quite follow all of that.
Thanks to the recently landed DomU support, the final pieces of the puzzle fell into place, allowing OpenBSD to function as a proper guest (with networking!)
Next it details the process of injecting a public SSH key into the instances for instant remote access.
An ec2-init.sh script was created (also on github) which does the following:
- setting the hostname
- installing the provided SSH public key to /root/.ssh/authorized_keys
- executing user-data (if it starts with a shebang)
- displaying the host SSH fingerprints on the console (to match cloud-init)
With that done, OpenBSD is pretty much AWS ready! He then gives a brief walkthrough of setting up nginx for new users, but if you’ve already done this before then the instance is ready for you to hacking on.
Start thinking of ideas for things with FreeBSD for Google's 2016 Summer of Code
- Students and Developers, listen up! It’s time to start thinking about GSoC again, and FreeBSD is looking to update its project ideas page.
- There’s some good ones on the list, plus ones that should be pruned (such as GELI boot), but now is the time to start adding new ones before we get too deep into the process.
- This goes for the other BSD’s as well, start thinking about your proposals, or if you are developer, which projects would be a good fit for mentoring.
- (Improving the Linux Compat layer is one I think should be done!) Guide to getting started with kernel hacking
- One of the things that’s been asked frequently is how to contribute towards the efforts to bring updated DRM / X drivers to the FreeBSD kernel.
- Jean-Sébastien Pédron has started a great guide on the Wiki which details how to get started with the porting effort, and that developers need not be afraid of helping. ***
Storage Summit Roundup
- Earlier this week a number of developers from FreeBSD, as well as various vendors that use FreeBSD, or provide products used with FreeBSD met for a Storage Summit, to discuss the future of these technologies
- The summit was co-located with the USENIX FAST (Filesystems And Storage Technologies) conference
- The summit was sponsored by the FreeBSD Foundation and FlightAware
- After a short introduction, the event opened with a Networking Synergy panel
- The focus of this panel was to see if there were techniques and lessons learned in improving the networking stack over the last 10 years that could be applied to improving the storage stack
- A lot of time was spent discussing issues like multi-queue support, CPU scheduling, and ways to modernize the stack
- CAM Scheduling & Locking Revamp
- No notes posted
- User Space Storage Stack
- One of the user space storage stacks discussed was Diskmap
- Like netmap, but for disks (diskmap)
- Kernel bypass for accessing disks
- Ilias Marinos, who is working on diskmap at Cambridge University, described diskmap to the group
- A design discussion then followed in which the memory management was covered as that's an issue for any sort of "IO" map system
- Action Items:
- Discuss with Luigi the idea of code merges
- Need a reset path API
- Kernel buffer mapping for reliability
- Support for other interfaces (SATA/SCSI)
- GEOM layer adaptation
- Adapting to New Storage Technologies
- This working group was led by Adrian Palmer, from Seagate
- SMR
- Persistent Memory
- Session 1: Device Identification and the structural requirements
- Agenda: We'll look over the Identification nuances and what needs to change to support the structure. Support for IO order guarantees, forward-write only requirements, new commands and topology. Dig into CAM and GEOM layers. Solutions should be fast and have as few code paths as possible
- Results: Small audience. We talked about zoned characteristics, and how it can be used in various workloads, projected to be implemented in years
- Session 2: Information dissemination and consumption
- Agenda: Where and how will information from the report_zones command be gathered, stored, combined and used. This will include userspace storage and multi-volume management. Will CAM store this data, or will GEOM? How frequently will this need to be queried/updated/verified from the drive?
- Results: Merged with ZFS working group to discuss SMR. Came up with idea that could be implemented as circular buffer zone type. Began to discuss solutions among developers
- ZFS
- During the first session we discussed how to improve dedup support
+ A dedup throttle or cap was discussed. When the size of the DDT grows beyond this size, new entries would not be deduped.
- An alternative to this was also discussed, where when the DDT reached the cap size, it would remove a random entry with only a single reference from the DDT to make room for the new entry. When a block is going to be freed, if it is not found in the DDT, it is assumed to have only 1 reference, and removed.
- There was also discussion of replacing the DDT with an in-memory hash table and a “log” of increment/decrement operations, that is periodically compacted. The hash table is recreated from the log at pool import time. This would reduce the in-memory footprint of the DDT, as well as speed up all write operations as adding an entry to the dedup log will be less expensive than updating the DDT.
- There was also discussion of using dedicated device(s) for the DDT, either using the DDT on SSD work by Nexenta, or the Metadata Classes work by Intel
- The first session also discussed Secure Delete and related things
- The desire for an implementation of TRIM that uses the “secure erase” functionality provided by some disks was expressed
- Overwriting sectors with patterns of garbage may be insufficient because SSDs may internally remap where a specific LBA physically resides
- The possibility of using something like the “eager zero” feature to periodically write zeros over all free blocks in the pool to erase any lingering data fragments
- Problems with the FreeBSD TRIM implementation were discussed, as well as looking at ways to implement the new ZFS TRIM implementation on FreeBSD
- ABD (ARC Buf Data) was discussed, a new design that lessens the requirement for contiguous memory. Only a small area of contiguous blocks is reserved at boot, and compressed ARC blocks are constructed of scatter-gather lists of individual pages
- The second session combined with the SMR group and talked about SMR support in ZFS
- Later in the second session ZFS Encryption was also discussed, mostly with a focus on what the use cases are
- The third session combined all of the groups for an overview of upcoming ZFS features including device removal and channel programs
- There was also a request for code review, for mostly finished projects like Persistent L2ARC, Writeback cache, and Large dnode support
- During the first session we discussed how to improve dedup support
+ A dedup throttle or cap was discussed. When the size of the DDT grows beyond this size, new entries would not be deduped.
- Hallway Track
- ZFS / VFS Interaction
- Adrian Palmer has been a FreeBSD hobbyist since FreeBSD 7, and I think I managed to convince him to start contributing ***
News Roundup
One Week with NetBSD 7.0: Back to Unix basics
- The author of this blog series is sending a week using NetBSD 7.0, following a previous series on Solaris 10
- “This is actually familiar territory, as I've been using BSD variants almost exclusively since 2006. My recent SunOS explorations were triggered last summer by OpenBSD having choked on my current laptop's NVIDIA card, and from what I could see at the time, FreeBSD had the same problem, although I now know NVIDIA drivers exist for that system. The thing that keeps me from going all-in with FreeBSD 10.x, however, is the fact that Firefox crashes and leaves "core dump" messages in its wake, and I'm just not a Chrome kinda guy.”
- “For those with a catholic taste in Unix, NetBSD is a keg party at the Vatican. If you're an absolute Unix beginner, or have been living on Ubuntu-based Linux distros for too long, then you may feel stranded at first by NetBSD's sparseness. You'll find yourself staring into the abyss and seeing only a blinking cursor staring back. If you have the presence of mind to type startx, you'll be greeted by twm, a window manager offering little more than an xterm window with the same blinking cursor until you learn how to configure the .twmrc file to include whatever applications you want or need in the right-click menu.”
- “As for NetBSD itself, I can't think of any major productivity applications that can't be installed, and most multimedia stuff works fine.”
- Issues the author hopes to sort out in later posts:
- Audio playback (youtube videos in Firefox)
- Wireless
- Flash
- Digital Camera SD Card readability, video playback
- Audacity
- A “fancy” desktop like Gnome 2, KDE, or xfce
- In a follow-up post, the author got LibreOffice installed and sorted out the audio issues they were having
- In a later follow-up XFCE is up and running as well ***
ZFS is for Containers in Ubuntu 16.04
- As you may have heard, Ubuntu 16.04 will include ZFS -- baked directly into Ubuntu -- supported by Canonical
- “ZFS one of the most beloved features of Solaris, universally coveted by every Linux sysadmin with a Solaris background. To our delight, we're happy to make to OpenZFS available on every Ubuntu system.”
- What does “supported by Canonical” mean?
- “You'll find zfs.ko automatically built and installed on your Ubuntu systems. No more DKMS-built modules”
- “The user space zfsutils-linux package will be included in Ubuntu Main, with security updates provided by Canonical”
- The article then provides a quick tutorial for setting up Linux Containers (LXC) backed by ZFS
- In the example, ZFS is backed by a file on the existing disk, not by a real disk, and with no redundancy
- However, the setup script seems to support using real block devices
- The Software Freedom Conservancy is expected to issue a statement detailing their opinion on the legalities and licensing issues of bundling ZFS with Linux. ***
Polling is a Hack: Server Sent Events (EventSource) with gevent, Flask, nginx, and FreeBSD
- A tutorial on setting up ‘Server-Sent Events’, also know as EventSource in javascript, to notify website clients of new data, rather than having the javascript constantly poll for new data.
- The setup uses FreeBSD, nginx, gevent, Python, and the Flask framework
- The tutorial walks through setting a basic Python application using the Flask framework
- Then setting up the client side in Javascript
- Then for the server side setup, it covers installing and configuring nginx, and py-supervisor on FreeBSD
- The tutorial also includes links to additional resources and examples, including how to rate limit the Flash application ***
Why FreeBSD?
- An excellent article written by Hamza Sheikh, discussing why FreeBSD is now his clear choice for learning UNIX.
- The article is pretty well written and lengthy, but has some great parts which we wanted to share with you:
There were many rough edges in the Linux world and some of them exist even today. Choosing the right distribution (distro) for the task at hand is always the first and most difficult decision to make. While this is a strength of the Linux community it is also its weakness. This is exacerbated with the toxic infighting within the community in the last few years.
A herd of voices believes it is their right to bring down a distro community because it is not like their distro of choice. Forking upstream projects has somehow become taboo. Hurling abuse in mailing lists is acceptable. Helping new users is limited to lambasting their distro of choice. Creating conspiracy theories over software decisions is the way to go. Copyleft zealots roam social media declaring non-copyleft free software heretic abominations. It all boils down to an ecosystem soured by the presence of maniacs who have the loudest voices and they seem to be everywhere you turn.
Where is the engineering among all this noise? Btrfs - baking for a long time - is still nowhere near ZFS in stability or feature parity. systemd is an insatiable entity that feeds on every idea in sight and just devours indiscriminately. Wayland was promised years ago and its time has yet to arrive. Containers are represented by Docker that neither securely contains applications nor makes them easy to manage in production. Firewalling is dithering between firewalld, nftables, etc. SystemTap cannot match DTrace.
In the same time span what do various BSDs offer? pf, CARP, ZFS, Hammer, OpenSSH, jails, pkgsrc, (software) ports, DTrace, hardware portability; just to name a few. Few would deny that BSDs have delivered great engineering with free software licenses to the entire world. To me they appear to be better flag bearers of free software with engineering to back it.
- He then goes through some of the various BSD’s and the specifics on why FreeBSD was the logical choice for his situation. But at the end has a great summary on the community as a whole:
Finally - and maybe repeating myself here - I have nothing but praise for the community. Be it BSD Now, mailing lists, Reddit, Twitter, LFNW, or SeaGL, people have encouraged me, answered my questions, and filed bugs for me. I have been welcomed and made a part of the community with open arms. These reasons are (good) enough for me to use FreeBSD and contribute to it.
BeastieBits
Copies of "FreeBSD Mastery: Specialty Filesystems" seen in the wild
pfsense training available in Europe
LiteBSD now has 50 ports in its ports tree
Ports tree locked for OpenBSD 5.9
“FreeBSD Filesystem Fun” at March semibug
Event #46 — Embedded Platforms (BSD, OpenWRT, Plan 9 & Inferno)