ZFS for FreeBSD

Eric Hodel | Mon, 28 Aug 2006 01:07:02 GMT

Hi.

I started porting the ZFS file system to the FreeBSD operating system.

There is a lot to do, but I’m making good progress, I think.

[...]

You can find all those on FreeBSD perforce server:

http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/user/pjd/zfs&HIDEDEL=NO

Ok, so where am I?

I ported the userland bits (libzfs, zfs and zpool). I had ztest and libzpool compiling and working as well, but I left them behind for now to focus on kernel bits.

I’m building in all (except 2) files into zfs.ko (kernel module).

I created new VDEV – vdev_geom, which fits to FreeBSD’s GEOM infrastructure, so basically you can use any GEOM provider to build your ZFS pool. VDEV_GEOM is implemented as consumers-only GEOM class.

I reimplemented ZVOL to also export storage as GEOM provider. This time it is providers-only GEOM class.

This way one can create for example RAID-Z on top of GELI encrypted disks or encrypt ZFS volume. The order is free. Basically you can put UFS on ZFS volumes already and it behaves really stable even under heavy load.

Currently I’m working on file system bits (ZPL), which is the most hard part of the entire ZFS port, because it talks to one of the most complex part of the FreeBSD kernel – VFS.

I can already mount ZFS-created file systems (with ‘zfs create’ command), create files/directories, change permissions/owner/etc., list directories content, and perform few other minor operation.

Porting ZFS file system to FreeBSD via freebsd-current

Eventually this will make its way into -current, then -stable. Yay!

Posted in  | 4 comments

FreeBSD 6 vs. Broadcom NetXtreme II

Eric Hodel | Sun, 20 Aug 2006 22:20:41 GMT

When we first got our new Dell PowerEdge development box the Broadcom NetXtreme II would occasionally report Error mapping mbuf into TX chain followed by the NIC no longer responding to ethernet. If you’ve got a new Dell, here’s how to update if_bce on FreeBSD 6 to fix the error.

Posted in  | no comments

socket_sendfile and socket_accept_filter

Eric Hodel | Fri, 24 Mar 2006 01:19:00 GMT

These are two packages that I use to speed up WEBrick image serving now freshly released. Unfortunately I haven’t tested them on any platform other than FreeBSD so please file bugs if they don’t work for you.

$ sudo gem install socket_sendfile
$ sudo gem install socket_accept_filter

socket_sendfile adds sendfile(2) to Socket and forms the cornerstone of our WEBrick image serving.

socket_accept_filter makes it easy to set the SO_ACCEPTFILTER socket option so you can enable the accf_http(9) and accf_data(9) accept filters. Accept filters delay the return from accept(2) until enough data has arrived on the socket for processing.

Shortly I’ll have enough software released to do a full write-up of high-volume image serving with WEBrick.

Posted in , ,  | 2 comments

MogileFS + Ruby take one

Eric Hodel | Sun, 30 Oct 2005 04:21:00 GMT

Right now I just support file operations, and only over NFS since FreeBSD + HTTP mode don’t like each other. I’ll get the admin operations finished next, then I’ll have something shippable.

Posted in ,

MogileFS + NFS = hard

Eric Hodel | Sat, 29 Oct 2005 11:26:00 GMT

I couldn’t get HTTP mode working, but I didn’t try very hard. It looks like the components only conditionally include Linux::AIO, but I’m not sure.

I submitted a documentation patch for MogileFS + NFS to the mailing list to help out the next people who try this. Its really only two extra sentences that you need.

Posted in ,

Safety Belts

Eric Hodel | Fri, 28 Oct 2005 22:53:00 GMT

Yes, I know Linux runs faster, but they can do that because they have thrown out the weight of the airbag, collision frame and safety belt.

—Poul-Henning Kamp

Posted in

FreeBSD, Linux and Timekeeping

Eric Hodel | Fri, 28 Oct 2005 18:12:00 GMT

I’ve been reading a fascinating thread on the freebsd-current mailing list about why MySQL on FreeBSD performs so much less well than Linux.

Apparently MySQL makes many, many calls to the kernel to figure out what time it is so that it can keep track of various things. On Linux this is no problem because they’ve got sloppy timekeeping in their kernel, but FreeBSD is much more accurate.

It eventually lead to a discussion of timers and timing in FreeBSD and how to get the current time faster.

Part of discussion reveals that on the x86 architecture it is incredibly difficult to get the current time in a fast and reliable way.

Posted in