OpenBSD Journal

Filesystem gets a huge performance boost

Contributed by Dengue on from the right-o-io dept.

Aaron Campbell writes : "Two aspects of the FFS filesystem in OpenBSD have received significant improvements since 2.8, increasing performance dramatically. Thanks to art, gluk, csapuntz, and a host of other developers and testers, Soft Updates are now much more stable than ever before. The second improvement, contributed by gluk@openbsd.org, is a new directory allocation policy (codenamed "dirpref"). Coupled with soft updates, the new dirpref code offers up to a 60x speed increase in gluk's tests, documented here:"

http://groups.google.com/groups?q=dirpref&num=100&hl=en&lr=&safe=off&rnum=2&seld=905073910&ic=1

I am personally running 4 of my machines with the latest changes (1.2GHz 256MB, 333MHz 160MB, P200MMX 32MB, PIII600 190MB Laptop) and things are working great. I didn't stress test it thoroughly myself, but here are some numbers: it took 19.26 seconds to untar the OpenBSD 2.8 srcsys.tar.gz file (7200 RPM UDMA100 IDE drive) and only 2.76 seconds to rm -rf it, on my 1.2GHz system. (Sorry, I do not have older numbers to compare to, see the above URL for comparison tests.) Another important change is that it is no longer necessary to run tunefs in single user mode to activate soft updates. All that is needed is to add the "softdep" mount option to the partitions you want soft updates enabled on in /etc/fstab."

(Comments are closed)


Comments
  1. By Jason Mealins () on

    just enabled it on my -current machine... and good lord, what an improvement, unziped ports.tar.gz in 9 seconds flat. And the ability to just add softdep into fstab makes it even nicer.

  2. By XiaouTuzi () qqart@lycos.com on mailto:qqart@lycos.com

    I work for a large company which needs to remain nameless who uses OpenBSD on some of our security equipment. I'd be interested in being pointed in the direction of, or being emailed the source code for dirpref and/or the soft updates.
    I could pass this on to someone in a decision making position and in so doing hopefully pave a broader path for the incorporation of openBSD's use within the company.

  3. By Bloggs () auto40956@hushmail.com on mailto:auto40956@hushmail.com

    The speed of file system I/O in OpenBSD has prevented me running it as my desktop for a while now. I've found it to be considerably slower than both FreeBSD's and Linux's file systems. In the past I've played around with the BUFCACHEPERCENT kernel option and enabled soft updates, however found no noticable performance increase. From the numbers quoted in the post to fa.openbsd.source-changes it looks like things have changed for the better. Great work guys! Hopefully this means I'll soon be able to run OpenBSD on my desktop and fileserver, as well as my firewall.

  4. By Bloggs () auto40956@hushmail.com on mailto:auto40956@hushmail.com

    The speed of file system I/O in OpenBSD has prevented me running it as my desktop for a while now. I've found it to be considerably slower than both FreeBSD's and Linux's file systems. In the past I've played around with the BUFCACHEPERCENT kernel option and enabled soft updates, however found no noticable performance increase. From the numbers quoted in the post to fa.openbsd.source-changes it looks like things have changed for the better. Great work guys! Hopefully this means I'll soon be able to run OpenBSD on my desktop and fileserver, as well as my firewall.

  5. By Justin Smith () jsmith@mcs.drexel.edu on http://vorpal.mcs.drexel.edu

    Is anyone working on porting the Reiser file system to OpenBSD. It speeds up my Linux system roughly 4x and I can pull the plug on my machine in the midst of a large compile and reboot without any damage to the file system. Reiser also handles small files well, packing them together within blocks. The only possible downside is: It requires lots of cache (the cache is basically the file system, with the disks being backup) and likes lots of free space in a disk drive (it works best with <70% utilization of a disk). But RAM and big drives are cheap these days...

  6. By Anonymous Coward () on

    How do you enable it? I've grabbed the latest 9-4-01 snapshot, but there's nothing on dirperf in the man pages.

  7. By Alex Hochberger () alex@feratech.com on http://www.feratech.com

    We were discussing today moving one of our systems from OpenBSD to FreeBSD because of File IO. My system is running very intensive IO with limited network issues, and we're sitting at 20% CPU max and a fraction of our memory being used, but our load is sitting around 6,5,5.

    My guess is that the file IO is killing us. Part of our problem is that we are on an IDE system (this machine wasn't intended for production, it just happened).

    This may be the life saver I need. However, I can't seem to find good resources on the Net for performance tuning OpenBSD. Would anyone know where I can find good resources on tuning my disk subsystem (including this patch) and possibly on memory utilization (with so little memory being used, I'm considered that the system isn't using enough as a disk buffer).

    We are running, on this machine, Apache, PostgreSQL, PHP 4, and SAMBA, the latter 3 running from the ports.

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]