snapshot implementation
Jeff Roberson
jroberson at jroberson.net
Fri Jan 1 23:17:38 UTC 2010
On Tue, 29 Dec 2009, Ben Schumacher wrote:
> On Sun, Dec 27, 2009 at 6:25 PM, Jeff Roberson <jroberson at jroberson.net> wrote:
>> It can take some time depending on fs activity on the machine. There are
>> ways to continue to optimize it within the existing infrastructure. It only
>> requires someone willing to expend the time.
>
> Any idea how complex of a task this is (and how much fruit it would
> bear)? I've been interested in dipping my toes into some FreeBSD
> kernel work, but I'm not exactly sure where to start. I honestly don't
> have tons of free time to work on it (job commitments and all that),
> but am curious if this is something that an experienced C programmer
> would have a shot at doing having very little experience with
> low-level kernel internals. (I'm used to dealing with POSIX interfaces
> and not the code that implements them...)
>
> I've recently picked up a copy of "The Design and Implementation of
> the FreeBSD OS", so I'm starting there, but I would love it if anybody
> could toss me a hint or two on what some of the low-hanging fruit in
> the arena might be. I've been playing with ZFS on a few boxes now, but
> I've had (even with FreeBSD 8) enough unusual crashes that I'm
> personally not ready to commit to using it on at least one "mission
> critical" project I'm working on. That being said I'd love to be able
> to do snapshots on the box without it hanging for over an hour due to
> the fact that the data drive is >400GB (frankly on the small side for
> some of the storage applications I've read about on this mailing
> list).
>
> Any hints, tips, pointers would be appreciated.
The daemon book is a good start. I'd say the snapshot problem might be a
bit tough right out of the gate but it could be possible if you have
strong fundamentals and someone experienced mentors you.
Why don't you read a bit of the daemon book and see if you can follow the
existing snapshot code to understand how it works. Once you feel like you
have a good graps of that email me directly and we'll talk. Kirk and I
discussed ways that we could speed it up dramatically by doing
copy-on-write of the cgs in the allocation functions. This would take
care of the considerable delay that is incurred when making a snapshot.
One good first project that would introduce you somewhat to the process of
kernel programming would be to add timing instrumentation to the various
stages of building a snapshot. This way you can prove where the delay
happens. Then you would be familiar with using timers, building custom
kernels, and a little bit of the snapshot code.
Cheers,
Jeff
>
> Cheers,
> Ben
>
More information about the freebsd-fs
mailing list