Remember the new scheduler work? Well, it continued, and now Francois Tigeot has posted pgbench benchmarks of the progress and benchmarks of DragonFly vs. other operating systems. The links are to PDFs; scroll down as each have multiple pages.
The summary result: If you’re running Postgres, you probably want to do it on DragonFly. The numbers are the best results for any BSD, even better to some extent than Linux, which has had its own issues with schedulers and Postgres. DragonFly 3.2 will include these improvements.
John Marino has accomplished the difficult task of putting gcc 4.7 into DragonFly. Version 4.4 is still the default, and the older 4.1 version has been disabled. If you want to try this newer version, setting WORLD_CCVER=gcc47 will build kernel and world that way too. If you’re curious about what’s different in this version of gcc, there’s a 4.7 changelog.
Are we the only BSD with this new a version in base? I think so.
P.S.: You’ll want to do a full buildworld if you’re running DragonFly 3.1
P.P.S.: you may need to put ‘NO_GCC47=true’ in make.conf, going from IRC comments.
P.P.P.S.: Nope, now it’s fine.
The combination of Mihai Carabas’s successful Summer of Code work on the scheduler and the recent Postgres benchmarking got Matthew Dillon to start thinking about making UNIX domain sockets work better, a shortcut around the buffer cache, scheduler improvements and then a new default scheduler, along with a change in idle CPU behavior. The best place to understand all the changes is in his long post to users@.
We should have benchmarks soon to show the performance improvements from all this.
If you do, they don’t get cleaned up during the normal ‘hammer cleanup’ nightly routine. Chris Turner has added a way to manually specify them as a cleanup target.
I’m pretty sure in this case ‘offline’ means ‘nothing streaming to it from a master disk’. I think.
Matthew Dillon has created an experiment: shared page table mappings. It’s controlled by a sysctl, since it’s still experimental. The real-world effect is reducing the number of memory faults as a process uses up memory, and decreasing the overall memory usage. The obvious benchmark is Postgres speed; this makes the initial expansion of memory usage much less of an drag on speed due to a high memory fault rate.
If all this mention of faulting sounds like a problem, remember memory faults on BSD are normal; that’s how programs indicate they need more memory space by causing a fault. This is in contrast to Linux, where memory is allocated a different way. Or at least, that’s my understanding. (If you know better, please comment.)
These are small, but they make life easier: Hammer now has a scoreboard file, for viewing of mirror-streams running in the background. There’s also a ssh-remote directive, so you can use ssh without enabling an interactive shell, and a HAMMER_RSH environment variable so different remote shells can be used. These are all for Hammer 1.
Antonio Huete has updated dhclient(8) to match the OpenBSD version from whence it comes. I think all (most?) the BSDs use the OpenBSD dhcp client as a base now. The only user-facing change I see in a quick reading of the changes is a new ‘egress’ command line option.
John Marino is working on updating tcl in pkgsrc. It’s apparently quite messy to update, which may be why it has sat out of date for some time. Never one to rest, he’s also been making FUSE filesystems work on DragonFly. (Here’s a FUSE explanation, if you need it.)
Also this. Someday I’m going to write a “games on DragonFly” feature, or series.
Matthew Dillon recent posted a status report for Hammer 2. Of interest is the spanning tree protocol being built to handle messages between Hammer volumes. As he says in the message:
For example, we want to be able to have millions of diskless or cache-only clients be able to connect into a cluster and have it actually work…
(No, it doesn’t do this, yet.)
Pierre Abbat noticed that bc(1)‘s usage of
GNU readline something that wasn’t GNU readline made it harder to use; Sascha Wildner changed it to use libedit. Pierre’s other complaint, that BSD man page output stays on-screen when completed, is a positive feature. Linux systems that clear man page output enrage me, because I expect to be able to take advantage of my scroll buffer.
Peter Avalos has updated a bunch of third-party software: tcpdump, libpcap, libarchive, tnftp, xz, and OpenPAM. Thanks Peter! If you need more info on what these things are, the information is out there.
John Marino has added a ‘gcc47′ compiler ccvar, so you can build world and kernel with it. ‘It’ is actually gcc-aux, since it seems to work better than the basic (“vanilla”?) gcc47. You also get Ada support, though that wasn’t the driving reason to pick it. This is brand new so don’t try it unless you’re ready to discover issues.
Is there any other BSD able to use gcc 4.7 for world/kernel? Even 4.6? Most of the attention has been on clang.
Nuno Antunes is still working on that netgraph upgrade. Among other changes, ng_tty has been added. What’s it do? Something with ppp, I think.
Based on a suggestion from Venkatesh Srinivas, tmpfs now uses a red-black tree for directory lookups, and is also now faster. Credit goes to Johannes Hofmann for doing the testing.
Sascha Wildner has synced find(1) with what’s in FreeBSD, which means there’s a lot more options available – see the commit for details. Many of them are for GNU compatibility, and I’m sure I’ll forget them all. I seem to have issues remembering how to use find(1) successfully.
Sascha Wildner has made it easier to use alternative syntax checking systems as a “lint” make target in DragonFly. His usage of coccinelle, as one of these alternatives, has already found many bugs – just today, for instance.
Is “alternative syntax checking systems” the right phrase for this? I don’t know. “Correctness checker”? My phrases all sound like something you’d read on a government form.
Reading this HAMMER2 commit carefully shows some future plans: remote cluster control, and the ability to mount nonlocal HAMMER2 volumes. A reminder: those are future plans, not what you can do now.
The i386-only doscmd(1) is gone from DragonFly. I don’t think I ever used it, as other emulators/systems are so prevalent and complete.
Sepherosa Ziehau has been doing a lot of work on packet transmission; far more than I link to here. The end result is startling performance on high-bandwidth links. I’m hoping for benchmarks at some point, but until then, I just wanted to publicly appreciate the work he’s done.
Sepherosa Ziehau has added netblast, a tool originally from FreeBSD that, if I’m reading the commit right, flings packets of a given size at an IP/port of your choosing, for as long as you want.
It’s possible to accidentally truncate your password when using DES encryption and 0×80 in UTF-8 encoding. It’s fixed.
Sepherosa Ziehau has made some changes to SIOCGIFDATA, so if you are using DragonFly-master and pf, you will need a full rebuild. Also pftop, if you use it.
Magliano Andrea Andrea Magliano, a new version of ACPI has been added to DragonFly, acpica-unix 20110527.
If you are running bleeding-edge DragonFly, libpthread was broken for a short period. If you built anything in the last … 12 hours? You may want to rebuild it. If that doesn’t describe you, it’s a nonevent.
It’s funny that I’m reporting a short-term break in bleeding-edge operating system code as any sort of surprise. It shows something about how stable DragonFly-master is most of the time.
Sepherosa Ziehau has been making various updates that conform to standards lately, including “RFC4653 Non-Congestion Robustness (NCR)” and “RFC3517bis“. I’m not familiar with what they do, but you can follow the links and read the RFCs if you are curious.
(Not sure if I got that 3517 one correct…)
Apparently Apache 2.4 has a bug that will cause network stalls when sending data that doesn’t line up with segment size. Sepherosa Ziehau has put in a workaround for the issue. Alternately, you can use www/apache22.
John Marino has updated libncurses, libedit, gdb, libgmp, and zlib. The release notes are helpfully contained within each commit. If that wasn’t enough, he’s also added terminfo, a future replacement for termcap, if I understand correctly.
Peter Avalos has updated OpenSSL in two different places:. The 3.0 release now has OpenSSL 1.0.0j, which fixes several security issues (see link for CVE IDs). DragonFly 3.1 now has OpenSSL 1.0.1c. As for a changelog… this, maybe?
You’d think everything that could be done with grep has already been done, but no: grep, which is an externally-produced program, has been updated in DragonFly to version 2.12 by John Marino.
A few recent updates imported to DragonFly from FreeBSD: Francois Tigeot updated amdsbwd(4), an AMD south bridge watchdog. Sascha Wildner updated arcmsr(4), the Areca RAID controller driver, and Peter Avalos updated pw(8).
In the other direction, FreeBSD now has GNU hash support for rtld, based on John Marino’s work in DragonFly.
Sepherosa Ziehau added “Rescue Retransmission for SACK-based Loss Recovery Algorithm” in a commit, where he details just where this would be handy. It’s on by default and the sysctl net.inet.tcp.rescuesack can be used to turn it off.
Peter Avalos has updated OpenSSL in DragonFly to version 1.0.1a, to fix the recent vulnerability CVE-2012-2110. Thanks Peter!
Francois Tigeot has followed up with a description of how to enable and disable quotas on DragonFly, which will work for most any local file system, unless rebooted. There’s also the vquota(8) man page.
Because of several recent commits, quotas can be set. They aren’t persistent yet, so they’ll vanish on reboot. The standard disclaimer applies, as this is new.
DragonFly now has a optimized scoreboard for SACK, thanks to Sepherosa Ziehau. What’s that mean? SACK is a way to make sure only the needed parts of a TCP transmission get retransmitted, when multiple packets are lost. The scoreboard is where the packets needing retransmission are tracked. So, the result of these improvements is better performance in packet-lossy situations.
(Please correct me if your understanding is better than mine; my explanation is based on stumbling around the Internet for a few minutes of reading.)
Sepherosa Ziehau has made changes to the initial TCP congestion window, based on a number of papers he links to in his post. The immediate effect is if you’re on DragonFly-current, you will need to do a full buildworld on your next upgrade. The long term effect could be improvements in latency by improving reactions to bufferbloat. Or not; this is pretty technical.
Peter Avalos has updated DragonF’y’s OpenSSL to version 1.0.1, in part to make future upgrades easier. See the changelog for what’s new. Look for the part specifically about 1.0.1, since the notes include unreleased material too.
If you’re trying DragonFly 3 in a virtual machine, you may have noticed some issues in booting in (for instance) Qemu. Sepherosa Ziehau committed a change that sets the sysctl hw.ioapic_enable to 0 in virtual environments. It can always be turned back on, but the recent MSI/MSI-X improvements seem to cause trouble in some virtual environment. You can also set that tunable at boot to get an initial install going.
(I haven’t had trouble in Virtualbox or VMWare, so you may or may not need this.)
Another “first BSD to try it” feature: GNU hash table support has been added by John Marino. These apparently speed up symbol searching during program startup, so it should improve large program startup time. Think KDE or Open Office, though I don’t have numbers to back it up.
It’s now possible to specify a jail ID when using pgrep and pkill(1), to capture processes specific to a jail. It’s similar to the same option in FreeBSD, except no compatibility issues since this option did not previously exist in DragonFly.
Have you ever tried to run a service and realized you forgot to make an entry in rc.conf to enable it? It’s mildly annoying. There’s now a “one’ keyword (via NetBSD) that lets you enable a service, once. It still apparently performs sanity checks, unlike the otherwise-similar ‘force’ keyword.
Here’s an interesting side effect that came up in Hammer 2 development: deleting files can potentially require modification of only one parent element. If I’m reading it right, that means deletion always takes about the same time, independent of the amount of data being deleted. Your ‘rm -rf /largedrive’ could complete, removing multiple terabytes of data before you realize it. I suppose it’s silly to complain about speedy results. Of course, being Hammer, it would still be available in history.
Thanks to John Marino’s work, it’s now possible to build the DragonFly kernel and world using gold, and have it work. You just have to set WORLD_LDVER to make it work. I don’t think there’s any user-visible change from this, other than a tiny speedup in building. I don’t know if any other BSD is using gold yet.
Alex Hornung added support for rdrand(4), the random number generator built into some Intel CPUs. That would be Ivy Bridge CPUs, which aren’t released yet, so it hasn’t been tested… but you’re covered for that day in the future when they arrive.
For the curious and technically oriented, Hammer 2 development can be watched directly by looking for any commits marked ‘hammer2′. There’s been a lot, and if you want to see the code as it flows in, here’s your chance.
John Marino has added support for preinit, init, and fini arrays. DragonFly is the first BSD to do so, apparently. What are they for? I’m not sure. The commit message points to more documentation, but not simple enough for me.
Nick Prokharau’s project for Google Summer of Code last year was “Port PUFFS from NetBSD/FreeBSD”. Sascha Wildner has now committed that to DragonFly. It’s experimental, so the normal caveats apply.
John Marino has made it possible to build world and kernel on DragonFly using GCC 4.6 in the form of gnat-aux. (We’re currently on GCC version 4.4) Note that version 4.6 isn’t included with DragonFly, so you would need to download and compile
GCC 4.6 a very recent version of lang/gnat-aux, and set CCVER=gcc46 before building world and kernel to try this out.
Update: John Marino points out in comments that you need to set WORLD_CCVER, not CCVER as his original message said.
ISDN support has been removed from DragonFly. It was not useful at this point, because it’s rarely used any more. It does make me feel a little sad; this was the technology everyone said was the future before cable modems and DSL were figured out.
Peter Avalos updated libpcap and tcpdump. This is on master, not the 3.0 branch.
A bit of symmetry in that title, there. Old ATA, which was replaced years ago, is finally gone. This should affect nobody…
John Marino has added support for RELRO in DragonFly, which makes it the first BSD to have it. That’s great news! What is it? Apparently a guard against memory corruption or overflow in the linker. His commit message gives better details.
Matthias Schmidt found a discussion about DragonFly’s password encryption. The result, if I am reading it correctly, is that brute-forcing the password from available hashes is quicker than it should be. Matthias also found a contributed fix. Samuel Greear updated to match the reference SHA implementation also in Linux, with this very pertinent warning.
Matthew Dillon has a very detailed commit message with changes to make sure Hammer will run overnight cleanups in situations as low as 256M of RAM. I think you can find that much RAM in breakfast cereal boxes these days.
What happens when you break enough things in DragonFly that you become a source of test cases? As Antonio Huete Jimenez (AKA “tuxillo” on IRC) found out, you get a stress test named after you.
Nuno Antunes has committed a large quantity of work on updating netgraph to version 7. His goal is to be able to run mpd5, though it’s not there yet. If you want to look at it, go to the monthly page and look around the 10th; there’s too much to link to individually.
Peter Avalos has updated OpenSSL to 1.0.0f; this is to fix 6 security issues identified in the OpenSSL changelog.
You may want to update for this – a lockup bug with the re(4) (RealTek 8xxx series) driver has been fixed.
John Marino updated libm, bringing a large quantity of functions. This may be a stopgap measure for now. As a positive side effect, buffer overflow attacks are a bit harder now.
The recently discovered telnetd vulnerability has been fixed in DragonFly, thanks to Peter Avalos. Apparently it’s been around everywhere forever. (last link via xhr) Hopefully there aren’t that many people that still need a telnet daemon; SSH has run it out of town for the most part.
Since I’m already talking about imports, several changes from FreeBSD and OpenBSD for NFS, plus more original material, have been brought in by Venkatesh Srinivas. Those changes from FreeBSD apparently improve NFS write performance, though I don’t have numbers to show.
There’s been a rare segfault present in DragonFly for quite some time. It’s been difficult to reproduce, and the 2.12 release due some months ago was held up specifically to fix it. Matthew Dillon was, after many days (months?) of work, able to replicate it reliably and eventually find a way around what appears to be a new AMD-specific bug. Read his very detailed explanation of what he did to get to this point.
Francois Tigeot benchmarked his accounting work with blogbench, and posted a PDF with the results. Dmitrij D. Czarkoff made a simpler graph, which can be used to draw the conclusion: blogbench didn’t work well for estimating the impact of VFS accounting. If you want to try accounting yourself, put
vfs.accounting_enabled="1" in your /boot/loader.conf.
(The normal DragonFly mailarchive isn’t updating because it feeds from DragonFly NNTP, and that’s not updating, so I’m using Gmane for post links.)
There is now a NO_BINUTILS221 option, added by Sascha Wildner, that will keep your system from building binutils 2.21 during a buildworld. The system will still build binutils 2.22, so there will still be a functioning ld on the system. Use this along with NO_GCC41 (so only gcc 4.4 gets built) to speed up your buildworlds, if you like.
If you’re looking to use IPMI and remotely watch the console of another system, Matthew Dillon has made some changes to help with that.
I’ve had a bunch of posts like this so far, but that’s not a bad thing. Sepherosa Ziehau has a pair of optimizations that appear to make performance with big pipes (1G) and tiny packets (18b, if I read correctly) reach near the physical maximum for 1000-base-T Ethernet.
Francois Tigeot has been working for quite a while on a VFS accounting system. It doesn’t restrict to a quota (yet), but it will give you byte totals for each mounted filesystem. It has been committed, so it looks like a good way to tell which PFS is eating your disk.
Update: Francois pointed out he’s still adding parts for this. So it’s not quite done yet, but soon.
Buildworlds are now much faster, because they can run themselves in parallel. Invoke it using the -j option to make. Matthew Dillon saw a 25% reduction in time when using ‘make -j 12 buildworld’ on a 4-core system. You may need to manually update xinstall and mkdir:
make clean; make obj; make all install
make clean; make obj; make all install
It’ll also use more memory than a non-parallel build, but heck, that’s cheap these days.
Venkatesh Srinivas made a minor change to a ddb backtrace – it now prints the raw instruction pointers. On x86_64, a backtrace would not print the correct objects out, so this is better. It’s a minor change, but I’m pointing it out because it totally helped solve a problem for me on a package-building machine.
Jan Lentfer has updated ldns in DragonFly to version 1.6.11. This brings in a bunch of bugfixes, which can be viewed at the ldns site’s changelog.
The general rule of thumb is that if you have a function written in an interpreted language (Perl, Python, etc.), it’ll be faster in C. If you need it faster than that, you go to assembly. Prepare to have your world rocked: Venkatesh Srinivas found that strlen() in libc was actually slower written in assembly than in C. His commit message has numbers to back that up.
It’s another throughput tweak from Sepherosa Ziehau: soaccept is run differently when pulling in network data from a socket. The commit message once again shows the results of the change using httperf.
Binutils in DragonFly is now up to version 2.22 – the commit linked is one of several.
Some time ago, Matthew Dillon worked on a bulk build system that built as much of pkgsrc in parallel as possible. It’s in the tree now as ‘fastbulk‘, for anyone wanting to try it out. I used it a bit; I didn’t measure the degree of speed increase, but was able to get about 70% of the packages built.
Sepherosa Ziehau has implemented another networking speedup. Read the commit message for details on what he changed, since it’s rather in-depth. He shows an 18% improvement in netperf results.
Sepherosa Ziehau has implemented an asynchronous pru_send in sendfile. The results are a 70-90% increase in performance, as shown in his netperf localhost test.
The man page for dfregress has been put together, and you can read it and find out how to contribute, right now.
(That man page should be up by the time this is posted…)
If you’re tracking DragonFly current, you will need to do a full buildworld on your next update. Sepherosa Ziehau made some changes in route(8) that a quickworld will not catch.